Add support for comments
This commit is contained in:
parent
106a58991d
commit
31bab456b0
|
@ -21,7 +21,11 @@ sub tokenize {
|
||||||
|
|
||||||
while ($str)
|
while ($str)
|
||||||
{
|
{
|
||||||
if ($str =~ s/^\(//)
|
if ($str =~ s/^;.*\n//)
|
||||||
|
{
|
||||||
|
# Comment. do nothing
|
||||||
|
}
|
||||||
|
elsif ($str =~ s/^\(//)
|
||||||
{
|
{
|
||||||
push @tokens, { type => LPAREN };
|
push @tokens, { type => LPAREN };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue