Parser now sets type member location
This commit is contained in:
parent
32faab8b36
commit
83fbd38c75
@ -25,6 +25,10 @@ func NewError (
|
|||||||
) (
|
) (
|
||||||
err Error,
|
err Error,
|
||||||
) {
|
) {
|
||||||
|
if location.File() == nil {
|
||||||
|
panic("cannot create new Error in a blank file")
|
||||||
|
}
|
||||||
|
|
||||||
return Error {
|
return Error {
|
||||||
Location: location,
|
Location: location,
|
||||||
message: message,
|
message: message,
|
||||||
|
@ -81,6 +81,8 @@ func (parser *parsingOperation) parseTypeSectionMember () (
|
|||||||
if err != nil { return }
|
if err != nil { return }
|
||||||
member.permission = parser.token.Value().(types.Permission)
|
member.permission = parser.token.Value().(types.Permission)
|
||||||
|
|
||||||
|
member.location = parser.token.Location()
|
||||||
|
|
||||||
// get name
|
// get name
|
||||||
err = parser.nextToken(lexer.TokenKindName)
|
err = parser.nextToken(lexer.TokenKindName)
|
||||||
if err != nil { return }
|
if err != nil { return }
|
||||||
|
Reference in New Issue
Block a user