`loc` will be the referencing "operator"

This commit is contained in:
Sasha Koshka 2022-09-03 16:24:13 -04:00
parent 48f72e614b
commit ac548bf438
3 changed files with 5 additions and 3 deletions

View File

@ -328,6 +328,8 @@ func (parser *ParsingOperation) parsePhraseCommand () (
switch identifier.trail[0] {
case "set":
kind = PhraseKindSet
case "loc":
kind = PhraseKindReference
case "defer":
kind = PhraseKindDefer
case "if":

View File

@ -231,6 +231,7 @@ const (
PhraseKindCallExternal
PhraseKindOperator
PhraseKindSet
PhraseKindReference
PhraseKindDefer
PhraseKindIf
PhraseKindElseIf

View File

@ -124,9 +124,8 @@ func ro gControlFlow
func ro hSetPhrase
---
set x:Int 3
# TODO: this should be the "location of" phrase. update other things to
# match.
set y:{Int} [. x]
# loc is a reference, similar to * in C
set y:{Int} [loc x]
set z:{Int 8}
398 9 2309 983 -2387
478 555 123