@@ -61,10 +61,10 @@ function ruleConflictCheck(ast: ProgramStatement, filePath: string): Diagnostic[
61
61
62
62
ast . body . forEach ( stmt => {
63
63
if ( statementIsA ( stmt , NodeType . Rule ) ) {
64
- const dictRule = dictionary . Rules . find ( r => r . name === stmt . rule ) ;
64
+ const dictRule = dictionary . Rules . find ( r => r . name === stmt . rule . value ) ;
65
65
66
66
ast . body . filter ( r => statementIsA ( r , NodeType . Rule ) ) . filter ( r => r . range !== stmt . range ) . map ( r => r as RuleStatement ) . forEach ( otherRules => {
67
- if ( dictRule . conflicts . includes ( otherRules . rule ) ) items . push ( {
67
+ if ( dictRule . conflicts . includes ( otherRules . rule . value ) ) items . push ( {
68
68
message : `Rule '${ otherRules . rule } ' conflicts with '${ stmt . rule } ', Both of them should not be defined.` ,
69
69
range : subRange ( otherRules . range ) ,
70
70
severity : DiagnosticSeverity . Warning ,
@@ -148,7 +148,7 @@ function importedExistentCheck(ast: ProgramStatement, filePath: string): Diagnos
148
148
ast . body . filter ( r => statementIsA ( r , NodeType . Import ) ) . map ( r => r as ImportStatement ) . forEach ( stmt => {
149
149
150
150
const filePathButPath = fileURLToPath ( filePath ) ;
151
- const fullPath = join ( filePathButPath , '../' , stmt . path ) ;
151
+ const fullPath = join ( filePathButPath , '../' , stmt . path . value ) ;
152
152
if ( ! existsSync ( fullPath ) ) items . push ( {
153
153
message : `Can't find file '${ fullPath } ' imported from '${ filePathButPath } '` ,
154
154
severity : DiagnosticSeverity . Error ,
0 commit comments