morloc-project / morloc

A typed, polyglot, functional language
GNU General Public License v3.0
195 stars 4 forks source link

Syntax error when '>' occurs after <foo> #2

Closed arendsee closed 7 years ago

arendsee commented 7 years ago

The LOC script

@path
foo . bar <bar>
@source sh
> x

segfaults when compiling to LIL.

But the following does not:

@path
foo . bar <bar>
@source sh
$ x
arendsee commented 7 years ago

There is something very wrong with the lexer. Material in the @source section should have no influence on anything outside it.

Until I fix this, you can use this horrible hack:

@path
foo . bar <bar>
#<
@source sh
> x