Minor "else" improvements
- Do not generate s.never to skip Else branch - Add Display impl to SourcePosition - Correct SourcePositions pointing to the end of a parsed expr instead of the beginning - Remove 'true', 'always', 'false' and 'never' from README.md
This commit is contained in:
@@ -1,4 +1,23 @@
|
||||
(
|
||||
; test else
|
||||
|
||||
(cmp 0 5
|
||||
(eq? (fault))
|
||||
(else? (ld r0 15))
|
||||
(lt? (fault)) ; This should produce a warning
|
||||
)
|
||||
(cmp 15 r0
|
||||
(ne? (fault "else did not run")))
|
||||
|
||||
(ld r0 0)
|
||||
|
||||
(cmp 0 5
|
||||
(lt? (nop))
|
||||
(else? (fault "fallthrough to else"))
|
||||
)
|
||||
|
||||
;
|
||||
|
||||
(ld r8 0)
|
||||
|
||||
(ld r0 1
|
||||
|
||||
Reference in New Issue
Block a user