Преглед на файлове

Implement Declarations and Parameters type check (partially)

-Refactor commands & expressions to include line/column information
-Still missing function body semantic check
Lucas de Souza преди 6 години
родител
ревизия
9a01ef980d
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      js/ast/ivprogParser.js

+ 2 - 2
js/ast/ivprogParser.js

@@ -3,6 +3,7 @@ import * as Expressions from './expressions/';
 import * as Commands from './commands/';
 import { SourceInfo } from './sourceInfo';
 import { Types, toInt, toString, toBool } from './types';
+import { SourceInfo } from './sourceInfo';
 import { convertFromString } from './operators';
 import { SyntaxErrorFactory } from './error/syntaxErrorFactory';
 import { LanguageDefinedFunction } from './../processor/definedFunctions';
@@ -351,9 +352,8 @@ export class IVProgParser {
 
   getBoolLiteral (token) {
     const val = toBool(token.text);
-    const sourceInfo = SourceInfo.createSourceInfo(token);
     const exp = new Expressions.BoolLiteral(val);
-    exp.sourceInfo = sourceInfo;
+    exp.sourceInfo = SourceInfo.createSourceInfo(token);;
     return exp;
   }