Trans output/parse error
Monkey Forums/Monkey Bug Reports/Trans output/parse error
| ||
If you run this from Ted (don't think target matters, but I'm using C++), the expected popup error states: Error : Syntax error - unexpected token '"Hello Function Main () Print "Hello End Function Function Nothing () End Function However, the console output shows this: Parsing... C:/Documents and Settings/James/Desktop/test.monkey<3> : Error : Syntax error - unexpected token '"Hello End Function Function Nothing () End Function ' Done. It's showing the remainder of the source code. Note that the initial popup message includes the starting ' and the console output ends with ' so I'm guessing there's some sort of parsing error going on related to that. |
| ||
yes when the end quote is missing, it takes the file from the start of the quote to the end of the file as part of a single quote. I guess since it's missing the end quote it produces that error. I have done that many times. |
| ||
I think it's also related to the fact that Monkey allows multiple statements per line, like this:Function Main () Print "Hello" End Function ... so it can't tell where the Hello line ends. Gotta say, I think a statement separator ought to be required here! I find the above far too ambiguous and can't see why it's permitted. |
| ||
The statement separator is ; Trans should produce compilation errors in the line you're writing, but the compiler is just ignoring them. |
| ||
Agreed! |
| ||
Seen this one, Mark? Just checked with 67c and notice it's still there. Know you've been busy though! |