diff --git a/etc/asma-test.sh b/etc/asma-test.sh index d5b85fc..5bd9883 100755 --- a/etc/asma-test.sh +++ b/etc/asma-test.sh @@ -10,6 +10,7 @@ expect_failure() { if ! grep -qF "${1}" asma-test/asma.log; then echo "error: asma didn't report error ${1} in faulty code" cat asma-test/asma.log + exit 1 fi } @@ -94,5 +95,8 @@ EOD expect_failure 'Label not found: .blah' <<'EOD' |1000 .blah EOD +expect_failure "Unrecognised token: 'a" <<'EOD' +|1000 'a +EOD echo 'All OK' diff --git a/projects/library/asma.tal b/projects/library/asma.tal index d9f7f9e..862cecb 100644 --- a/projects/library/asma.tal +++ b/projects/library/asma.tal @@ -735,10 +735,6 @@ &valid ;asma-advance-addr JMP2 ( tail call ) -@asma-raw-char - ;asma/token LDA2 LDA - ;asma-write-byte JMP2 ( tail call ) - @asma-raw-word ;asma/token LDA2 @@ -962,8 +958,7 @@ &24 :&23 :&25 "$ 00 :asma-pad-relative &25 $2 $2 "% 00 :asma-macro-define &26 :&24 :&29 26 00 ( & ) :asma-sublabel-define - &27 $2 $2 "' 00 :asma-raw-char - &28 :&27 $2 "( 00 :asma-comment-start + &28 $2 $2 "( 00 :asma-comment-start &29 :&28 :&2c ") 00 :asma-comment-end &2c $2 $2 ", 00 :asma-literal-rel-addr &_entry :&26 :&7b ". 00 :asma-literal-zero-addr