Dereference parsing stub
This commit is contained in:
parent
1cd7511ced
commit
fae8bedfa9
@ -3,7 +3,7 @@ package parser
|
||||
import "git.tebibyte.media/arf/arf/lexer"
|
||||
import "git.tebibyte.media/arf/arf/infoerr"
|
||||
|
||||
// TODO: add support for dereferences and subscripts
|
||||
// TODO: add support for dereferences and subscripts (currently being worked on)
|
||||
|
||||
var validArgumentStartTokens = []lexer.TokenKind {
|
||||
lexer.TokenKindName,
|
||||
@ -14,6 +14,7 @@ var validArgumentStartTokens = []lexer.TokenKind {
|
||||
lexer.TokenKindString,
|
||||
|
||||
lexer.TokenKindLBracket,
|
||||
lexer.TokenKindLBrace,
|
||||
lexer.TokenKindLParen,
|
||||
}
|
||||
|
||||
@ -78,9 +79,13 @@ func (parser *ParsingOperation) parseArgument () (argument Argument, err error)
|
||||
parser.nextToken()
|
||||
|
||||
case lexer.TokenKindLBracket:
|
||||
argument.kind = ArgumentKindPhrase
|
||||
argument.kind = ArgumentKindPhrase
|
||||
argument.value, err = parser.parseArgumentLevelPhrase()
|
||||
|
||||
case lexer.TokenKindLBrace:
|
||||
argument.kind = ArgumentKindDereference
|
||||
argument.value, err = parser.parseDereference()
|
||||
|
||||
case lexer.TokenKindLParen:
|
||||
argument.kind = ArgumentKindList
|
||||
argument.value, err = parser.parseList()
|
||||
|
12
parser/dereference.go
Normal file
12
parser/dereference.go
Normal file
@ -0,0 +1,12 @@
|
||||
package parser
|
||||
|
||||
// import "git.tebibyte.media/arf/arf/lexer"
|
||||
// import "git.tebibyte.media/arf/arf/infoerr"
|
||||
|
||||
func (parser *ParsingOperation) parseDereference () (
|
||||
dereference Dereference,
|
||||
err error,
|
||||
) {
|
||||
// TODO
|
||||
return
|
||||
}
|
Reference in New Issue
Block a user