Skip to content

Commit

Permalink
Work in progress on the parser (#41)
Browse files Browse the repository at this point in the history
* Correctly parse empty parameters in lambda
* Correctly parse empty arrays
* Some not very successful efforts to use less memory
* Update to Kiuatan 1.5.2
  • Loading branch information
chalcolith authored Nov 27, 2024
1 parent 6bc8fc5 commit 2e27ec7
Show file tree
Hide file tree
Showing 19 changed files with 339 additions and 278 deletions.
2 changes: 1 addition & 1 deletion corral.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"deps": [
{
"locator": "github.com/chalcolith/kiuatan.git",
"version": "1.5.1"
"version": "1.5.2"
},
{
"locator": "github.com/ponylang/logger.git",
Expand Down
22 changes: 16 additions & 6 deletions eohippus-cli/main.pony
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ actor Main
lint_errors: ReadSeq[analyzer.AnalyzerError] val,
analyze_errors: ReadSeq[analyzer.AnalyzerError] val)
=>
print_errors(workspace_errors)
print_errors(workspace_errors, None)

be analyzed_file(
analyze: analyzer.Analyzer,
Expand All @@ -88,20 +88,30 @@ actor Main
lint_errors: ReadSeq[analyzer.AnalyzerError] val,
analyze_errors: ReadSeq[analyzer.AnalyzerError] val)
=>
print_errors(parse_errors)
print_errors(analyze_errors)
print_errors(lint_errors)
print_errors(parse_errors, canonical_path)
print_errors(analyze_errors, canonical_path)
print_errors(lint_errors, canonical_path)

be analyze_failed(
analyze: analyzer.Analyzer,
task_id: USize,
canonical_path: String,
errors: ReadSeq[analyzer.AnalyzerError] val)
=>
print_errors(errors)
print_errors(errors, canonical_path)

fun print_errors(errors: ReadSeq[analyzer.AnalyzerError] val) =>
fun print_errors(
errors: ReadSeq[analyzer.AnalyzerError] val,
path: (String | None))
=>
for e in errors.values() do
match path
| let path': String =>
if e.canonical_path != path' then
continue
end
end

let kind =
match e.severity
| analyzer.AnalyzeError =>
Expand Down
Loading

0 comments on commit 2e27ec7

Please sign in to comment.