Error
data class Error(var id: String, var line: Int, var charPosition: Int, var msg: String) : CompilationError
Defines the lexical and syntax errors in the source program
Example:
11: int main(){
12: ^1234.5;
13: return 0;
14: }
Error: main.c:12:5: expected expression before ‘^’ token
Instance of Error class:
Error(
"Lexical Error",
12,
5,
"expected expression before ‘^’ token"
)
Content copied to clipboard