fix comments pointers

This commit is contained in:
z7zmey
2018-01-08 21:50:39 +02:00
parent 4ecb9edbd8
commit b7b859edaa
163 changed files with 426 additions and 430 deletions

View File

@@ -8,8 +8,8 @@ type TokenInterface interface {
GetValue() string
GetStartLine() int
GetEndLine() int
Comments() *[]comment.Comment
SetComments(comments *[]comment.Comment) Token
Comments() []comment.Comment
SetComments(comments []comment.Comment) Token
}
type Token struct {
@@ -18,7 +18,7 @@ type Token struct {
EndLine int
StartPos int
EndPos int
comments *[]comment.Comment
comments []comment.Comment
}
func NewToken(value []byte, startLine int, endLine int, startPos int, endPos int) Token {
@@ -39,11 +39,11 @@ func (t Token) GetEndLine() int {
return t.EndLine
}
func (t Token) Comments() *[]comment.Comment {
func (t Token) Comments() []comment.Comment {
return t.comments
}
func (t Token) SetComments(comments *[]comment.Comment) Token {
func (t Token) SetComments(comments []comment.Comment) Token {
t.comments = comments
return t
}