loc
will be the referencing "operator"
This commit is contained in:
parent
48f72e614b
commit
ac548bf438
@ -328,6 +328,8 @@ func (parser *ParsingOperation) parsePhraseCommand () (
|
|||||||
switch identifier.trail[0] {
|
switch identifier.trail[0] {
|
||||||
case "set":
|
case "set":
|
||||||
kind = PhraseKindSet
|
kind = PhraseKindSet
|
||||||
|
case "loc":
|
||||||
|
kind = PhraseKindReference
|
||||||
case "defer":
|
case "defer":
|
||||||
kind = PhraseKindDefer
|
kind = PhraseKindDefer
|
||||||
case "if":
|
case "if":
|
||||||
|
@ -231,6 +231,7 @@ const (
|
|||||||
PhraseKindCallExternal
|
PhraseKindCallExternal
|
||||||
PhraseKindOperator
|
PhraseKindOperator
|
||||||
PhraseKindSet
|
PhraseKindSet
|
||||||
|
PhraseKindReference
|
||||||
PhraseKindDefer
|
PhraseKindDefer
|
||||||
PhraseKindIf
|
PhraseKindIf
|
||||||
PhraseKindElseIf
|
PhraseKindElseIf
|
||||||
|
@ -124,9 +124,8 @@ func ro gControlFlow
|
|||||||
func ro hSetPhrase
|
func ro hSetPhrase
|
||||||
---
|
---
|
||||||
set x:Int 3
|
set x:Int 3
|
||||||
# TODO: this should be the "location of" phrase. update other things to
|
# loc is a reference, similar to * in C
|
||||||
# match.
|
set y:{Int} [loc x]
|
||||||
set y:{Int} [. x]
|
|
||||||
set z:{Int 8}
|
set z:{Int 8}
|
||||||
398 9 2309 983 -2387
|
398 9 2309 983 -2387
|
||||||
478 555 123
|
478 555 123
|
||||||
|
Reference in New Issue
Block a user