Updated phrase terminology

This commit is contained in:
Sasha Koshka 2022-10-25 00:02:24 -04:00
parent 4929081d87
commit e067483942
2 changed files with 30 additions and 3 deletions

View File

@ -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)

View File

@ -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
)