From e06748394227e6cb7681bf8577c266e806c730fe Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Tue, 25 Oct 2022 00:02:24 -0400 Subject: [PATCH] Updated phrase terminology --- parser/phrase.go | 2 +- parser/tree.go | 31 +++++++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/parser/phrase.go b/parser/phrase.go index 5962d84..c2a4578 100644 --- a/parser/phrase.go +++ b/parser/phrase.go @@ -306,7 +306,7 @@ func (parser *parsingOperation) parsePhraseCommand () ( // determine semantic role of phrase if command.kind == ArgumentKindString { - kind = PhraseKindCallExternal + kind = PhraseKindArbitrary } else if command.kind == ArgumentKindIdentifier { identifier := command.value.(Identifier) diff --git a/parser/tree.go b/parser/tree.go index 6f247cc..9f0e6d4 100644 --- a/parser/tree.go +++ b/parser/tree.go @@ -231,19 +231,46 @@ type Dereference struct { type PhraseKind int const ( - PhraseKindCall = iota - PhraseKindCallExternal + // [name] + PhraseKindCall PhraseKind = iota + + // ["name"] + PhraseKindArbitrary + + // [+] [-] PhraseKindOperator + + // [= x y] PhraseKindAssign + + // [loc x] PhraseKindReference + + // [cast x T] PhraseKindCast + + // [defer] PhraseKindDefer + + // [if c] PhraseKindIf + + // [elseif] PhraseKindElseIf + + // [else] PhraseKindElse + + // [switch] PhraseKindSwitch + + // [case] PhraseKindCase + + // [while c] PhraseKindWhile + + // [for x y z] PhraseKindFor )