git @ Cat's Eye Technologies Tamsin / 90c9f22
Just add some notes. Cat's Eye Technologies 11 years ago
1 changed file(s) with 16 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
723723 | main = ("c" & "a" & "t" & " ") with raw & "dog".
724724 + cat dog
725725 = dog
726
727 But you need to be careful with `with`! You should not put `with` inside
728 a rule that can fail, i.e. the LHS of `|` or inside a `{}`. Because if it
729 does fail and the interpreter reverts the scanner to its previous state,
730 its previous state may have been a different scanner. The result may well
731 be eurr. I could make this a static error, but... for now, just remember
732 this and be careful.
726733
727734 Aside #2
728735 --------
801808 = .
802809
803810 Indeed we can.
811
812 The next logical step would be to be able to say
813
814 main = program with scanner.
815 scanner = scan with raw.
816 scan = {" "} & (...)
817 program = "token" & ";" & "token" & ...
818
819 But we're not there yet.