Skip to content

Commit

Permalink
Implement assignment (rw checking woefully inadequate atm)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan O'Rear committed Jul 13, 2010
1 parent 2fbc8c5 commit e22978c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Niecza/Actions.pm
Expand Up @@ -445,6 +445,10 @@ sub insn__S_fetch { my ($cl, $M) = @_;
$M->{_ast} = [[ 'fetch' ]];
}

sub insn__S_store { my ($cl, $M) = @_;
$M->{_ast} = [[ 'store' ]];
}

sub insn__S_dup_fetch { my ($cl, $M) = @_;
$M->{_ast} = [[ 'dup_fetch' ]];
}
Expand Down
1 change: 1 addition & 0 deletions Niecza/Grammar.pm6
Expand Up @@ -82,6 +82,7 @@ grammar NIL is STD {
token insn:wrap { <sym> }
token insn:wrapobj { <sym> }
token insn:fetch { '@' }
token insn:store { '!' }
token insn:dup_fetch { 'dup@' }
token insn:pos { '=[' <?> ~ ']' <decint> }
token insn:clone_lex { 'CLONE:' [ \h* <varid> \h* ] ** ',' \h* \n }
Expand Down
2 changes: 2 additions & 0 deletions setting
Expand Up @@ -295,4 +295,6 @@ sub say { Q:NIL {
.plaincall/1:Console.WriteLine null:Variable
} }

sub infix:<=> { Q:NIL { =[0] =[1] @ ! =[0] @ } }
YOU_ARE_HERE;

0 comments on commit e22978c

Please sign in to comment.