Compare commits

..

No commits in common. "line-symbol" and "master" have entirely different histories.

4 changed files with 2 additions and 19 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ out/
*.zip
prg/**/*.ast
prg/**/*.out
prg/**/*.pins25

View File

@ -1,4 +0,0 @@
fun putint(n)
fun main() =
putint(__LINE__)

View File

@ -148,11 +148,7 @@ public record Token(Report.Location location, Symbol symbol, String lexeme) impl
/**
* Simbol {@code )}.
*/
RPAREN,
/**
* Simbol {@code __LINE__}.
*/
LINE
RPAREN;
}
@Override

View File

@ -319,7 +319,6 @@ public class LexAn implements AutoCloseable {
case "let" -> Token.Symbol.LET;
case "in" -> Token.Symbol.IN;
case "end" -> Token.Symbol.END;
case "__LINE__" -> Token.Symbol.LINE;
default -> null;
};
}
@ -452,15 +451,6 @@ public class LexAn implements AutoCloseable {
symbol = Token.Symbol.IDENTIFIER;
}
if (symbol == Token.Symbol.LINE) {
buffToken = new Token(
new Report.Location(startLocation, endLocation),
Token.Symbol.INTCONST,
Integer.toString(startLocation.begLine())
);
return;
}
buffToken = new Token(
new Report.Location(startLocation, endLocation),
symbol,