diff --git a/SMILEBASIC/parser.d b/SMILEBASIC/parser.d index c8273ee..f75dbe1 100644 --- a/SMILEBASIC/parser.d +++ b/SMILEBASIC/parser.d @@ -770,6 +770,7 @@ class Parser void syntaxError() { stderr.writeln("Syntax error (", lex.getLine(), ')', " Mysterious ", lex.front().type); + stderr.writeln(this.getLine(lex.location)); try { throw new Exception("Stacktrace"); diff --git a/SMILEBASIC/petitcomputer.d b/SMILEBASIC/petitcomputer.d index e41cb13..b77c257 100644 --- a/SMILEBASIC/petitcomputer.d +++ b/SMILEBASIC/petitcomputer.d @@ -145,7 +145,7 @@ struct Slot program.clear(); foreach(l; splitter(data, "\n")) { - program.insertBack(l); + program.insertBack(l ~ '\n'); } } }