Added detection of recursive include errors.
This commit is contained in:
parent
3967d27173
commit
26b90ac69c
|
@ -62,6 +62,11 @@ expect_failure 'Memory overwrite: SUB' <<'EOD'
|
||||||
|2000 ADD
|
|2000 ADD
|
||||||
|1000 SUB
|
|1000 SUB
|
||||||
EOD
|
EOD
|
||||||
|
expect_failure 'Recursion level too deep:' <<'EOD'
|
||||||
|
%me { you }
|
||||||
|
%you { me }
|
||||||
|
|1000 me
|
||||||
|
EOD
|
||||||
|
|
||||||
echo 'All OK'
|
echo 'All OK'
|
||||||
|
|
||||||
|
|
|
@ -759,9 +759,8 @@ include projects/library/heap.tal
|
||||||
( hex short ) ,asma-short-helper/raw JMP
|
( hex short ) ,asma-short-helper/raw JMP
|
||||||
|
|
||||||
¬-hex
|
¬-hex
|
||||||
;asma-trees/macros ;asma-traverse-tree JSR2 ,¬-macro JCN
|
|
||||||
|
|
||||||
.System/rst DEI #e0 GTH ,&too-deep JCN
|
.System/rst DEI #e0 GTH ,&too-deep JCN
|
||||||
|
;asma-trees/macros ;asma-traverse-tree JSR2 ,¬-macro JCN
|
||||||
|
|
||||||
¯o-loop
|
¯o-loop
|
||||||
LDAk ,&keep-going JCN
|
LDAk ,&keep-going JCN
|
||||||
|
@ -770,9 +769,13 @@ include projects/library/heap.tal
|
||||||
|
|
||||||
&keep-going
|
&keep-going
|
||||||
DUP2k ;strlen JSR2 INC2 ADD2
|
DUP2k ;strlen JSR2 INC2 ADD2
|
||||||
SWP2 ;asma-assemble-token JSR2 asma-IF-ERROR ,&error JCN
|
SWP2 ;asma-assemble-token JSR2 asma-IF-ERROR ,¯o-error JCN
|
||||||
,¯o-loop JMP
|
,¯o-loop JMP
|
||||||
|
|
||||||
|
¯o-error
|
||||||
|
POP2
|
||||||
|
JMP2r
|
||||||
|
|
||||||
¬-macro
|
¬-macro
|
||||||
POP2
|
POP2
|
||||||
;&include-string ;asma/token LDA2
|
;&include-string ;asma/token LDA2
|
||||||
|
@ -782,11 +785,9 @@ include projects/library/heap.tal
|
||||||
|
|
||||||
¬-include
|
¬-include
|
||||||
;asma-msg-label ;asma/error STA2
|
;asma-msg-label ;asma/error STA2
|
||||||
&error
|
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
&too-deep
|
&too-deep
|
||||||
POP2
|
|
||||||
;asma-msg-too-deep ;asma/error STA2
|
;asma-msg-too-deep ;asma/error STA2
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
|
@ -808,7 +809,7 @@ include projects/library/heap.tal
|
||||||
@asma-msg-label "Label 20 "not 20 "found 00
|
@asma-msg-label "Label 20 "not 20 "found 00
|
||||||
@asma-msg-macro "Macro 20 "already 20 "exists 00
|
@asma-msg-macro "Macro 20 "already 20 "exists 00
|
||||||
@asma-msg-rewound "Memory 20 "overwrite 00
|
@asma-msg-rewound "Memory 20 "overwrite 00
|
||||||
@asma-msg-too-deep "Macro 20 "expansion 20 "level 20 "too 20 "deep 00
|
@asma-msg-too-deep "Recursion 20 "level 20 "too 20 "deep 00
|
||||||
|
|
||||||
( trees )
|
( trees )
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue