Skip to content

Commit

Permalink
Adapt to new Query format of web-tree-sitter
Browse files Browse the repository at this point in the history
  • Loading branch information
adeas31 committed Feb 27, 2025
1 parent 4f7765b commit 09fec55
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
12 changes: 8 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions server/src/analyzer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ export class MetaModelicaQueries {
public startEndIdent: Parser.Query;

constructor(language: Parser.Language) {
this.identifier = language.query('(IDENT) @identifier');
this.classType = language.query('(class_type) @type');
this.error = language.query('(ERROR) @error');
this.illegalEquals = language.query('(assign_clause_a (simple_expression) (EQUALS) @error )');
this.illegalAssign = language.query('[ ( equation (simple_expression) (ASSIGN) @error ) ( constraint (simple_expression) (ASSIGN) @error ) ]');
this.modifierAssign = language.query('(modification (ASSIGN) @warning)');
this.caseEquation = language.query('(onecase (EQUATION) @info)');
this.missingElseCaseMatch = language.query('(match_expression [(MATCH) (MATCHCONTINUE)] @info (cases case: (onecase)* case: (onecase) . ))');
this.matchcontinue = language.query('(match_expression . (MATCHCONTINUE) @info (expression) )');
this.startEndIdent = language.query('(class_specifier identifier: (identifier) @start endIdentifier: (identifier) @end )');
this.identifier = new Parser.Query(language, '(IDENT) @identifier');
this.classType = new Parser.Query(language, '(class_type) @type');
this.error = new Parser.Query(language, '(ERROR) @error');
this.illegalEquals = new Parser.Query(language, '(assign_clause_a (simple_expression) (EQUALS) @error )');
this.illegalAssign = new Parser.Query(language, '[ ( equation (simple_expression) (ASSIGN) @error ) ( constraint (simple_expression) (ASSIGN) @error ) ]');
this.modifierAssign = new Parser.Query(language, '(modification (ASSIGN) @warning)');
this.caseEquation = new Parser.Query(language, '(onecase (EQUATION) @info)');
this.missingElseCaseMatch = new Parser.Query(language, '(match_expression [(MATCH) (MATCHCONTINUE)] @info (cases case: (onecase)* case: (onecase) . ))');
this.matchcontinue = new Parser.Query(language, '(match_expression . (MATCHCONTINUE) @info (expression) )');
this.startEndIdent = new Parser.Query(language, '(class_specifier identifier: (identifier) @start endIdentifier: (identifier) @end )');
}

/**
Expand Down
1 change: 1 addition & 0 deletions server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"moduleResolution": "node",
"declaration": true,
"sourceMap": true,
"skipLibCheck": true,
"strict": true,
"outDir": "out",
"rootDir": "src",
Expand Down

0 comments on commit 09fec55

Please sign in to comment.