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 // determine semantic role of phrase
if command.kind == ArgumentKindString { if command.kind == ArgumentKindString {
kind = PhraseKindCallExternal kind = PhraseKindArbitrary
} else if command.kind == ArgumentKindIdentifier { } else if command.kind == ArgumentKindIdentifier {
identifier := command.value.(Identifier) identifier := command.value.(Identifier)

View File

@ -231,19 +231,46 @@ type Dereference struct {
type PhraseKind int type PhraseKind int
const ( const (
PhraseKindCall = iota // [name]
PhraseKindCallExternal PhraseKindCall PhraseKind = iota
// ["name"]
PhraseKindArbitrary
// [+] [-]
PhraseKindOperator PhraseKindOperator
// [= x y]
PhraseKindAssign PhraseKindAssign
// [loc x]
PhraseKindReference PhraseKindReference
// [cast x T]
PhraseKindCast PhraseKindCast
// [defer]
PhraseKindDefer PhraseKindDefer
// [if c]
PhraseKindIf PhraseKindIf
// [elseif]
PhraseKindElseIf PhraseKindElseIf
// [else]
PhraseKindElse PhraseKindElse
// [switch]
PhraseKindSwitch PhraseKindSwitch
// [case]
PhraseKindCase PhraseKindCase
// [while c]
PhraseKindWhile PhraseKindWhile
// [for x y z]
PhraseKindFor PhraseKindFor
) )