Skip to content

Commit dcb4936

Browse files
committed
- a first complete Susan lexer/parser error reporting implementation
it is usable primarily with MDT in Eclipse ... reported errors are marked directly in code editor when the .tpl file is opened git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@4647 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent b02679a commit dcb4936

File tree

13 files changed

+10307
-3486
lines changed

13 files changed

+10307
-3486
lines changed

Compiler/SimCodeC.mo

Lines changed: 1950 additions & 589 deletions
Large diffs are not rendered by default.

Compiler/TplAbsyn.mo

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,17 @@ uniontype TypeSignature
6262
end UNRESOLVED_TYPE;
6363
end TypeSignature;
6464

65-
uniontype ParseInfo
66-
record PARSE_INFO
65+
uniontype SourceInfo
66+
record SOURCE_INFO
6767
String fileName;
6868
//Boolean isReadOnly "isReadOnly : (true|false). Should be true for libraries" ;
69-
Integer lineNumberStart "lineNumberStart" ;
70-
Integer columnNumberStart "columnNumberStart" ;
71-
Integer lineNumberEnd "lineNumberEnd" ;
72-
Integer columnNumberEnd "columnNumberEnd" ;
69+
Integer lineNumberStart;
70+
Integer columnNumberStart;
71+
Integer lineNumberEnd;
72+
Integer columnNumberEnd ;
7373
//TimeStamp buildTimes "Build and edit times";
74-
end PARSE_INFO;
75-
end ParseInfo;
74+
end SOURCE_INFO;
75+
end SourceInfo;
7676

7777
public
7878
uniontype Expression
@@ -153,6 +153,10 @@ uniontype Expression
153153
list<Expression> args;
154154
end NORET_CALL;
155155

156+
157+
record ERROR_EXP "Parse error expression used when parser error occured."
158+
end ERROR_EXP;
159+
156160
end Expression;
157161

158162
public

Compiler/TplMain.mo

Lines changed: 50 additions & 50 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)