Xtext Display line numbers [message #1727819] |
Mon, 28 March 2016 06:21 |
chris yo Messages: 146 Registered: February 2013 |
Senior Member |
|
|
I want to display the line number where the error has occurred.
For example, if I have the grammar:
Quote:
Model:
defs += myTestMethod*
;
myTestMethod:
'test' name=ID ';'
;
In my config file, I have the following configuration in test.mak:
Quote:
test start;
test sleep;
test wakeup;
In my testValidator.xtend:
class testValidator {
def checkTest()
{
if (name == "wakeup")
print.error("wakeup is not supported.");
}
}
In my error message, I want to display the file name and line number where the "wakeup" is configured.
I am looking for something like this:
"ERROR: test.mak, line 3: no name configured.
I am looking for ways to display the filename and line number (in bold).
[Updated on: Mon, 28 March 2016 07:44] Report message to a moderator
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03439 seconds