moved a subset of source file to the kern package
This commit is contained in:
@@ -104,7 +104,7 @@ func (parser *parser) parseFuncDef(scanner *scanner) (tree *term, err error) {
|
||||
param := newTerm(tk)
|
||||
if len(args) > 0 {
|
||||
if pos := paramAlreadyDefined(args, param); pos > 0 {
|
||||
err = tk.Errorf("parameter %q at position %d already defined at position %d", param.source(), len(args)+1, pos)
|
||||
err = tk.Errorf("parameter %q at position %d already defined at position %d", param.Source(), len(args)+1, pos)
|
||||
break
|
||||
}
|
||||
}
|
||||
@@ -155,7 +155,7 @@ func (parser *parser) parseFuncDef(scanner *scanner) (tree *term, err error) {
|
||||
func paramAlreadyDefined(args []*term, param *term) (position int) {
|
||||
position = 0
|
||||
for i, arg := range args {
|
||||
if arg.source() == param.source() {
|
||||
if arg.Source() == param.Source() {
|
||||
position = i + 1
|
||||
}
|
||||
}
|
||||
@@ -397,7 +397,7 @@ func couldBeACollection(t *term) bool {
|
||||
func listSubTree(tree *ast, listTerm *term, allowIndeces bool) (root *term, err error) {
|
||||
var tk *Token
|
||||
if allowIndeces {
|
||||
tk = NewToken(listTerm.tk.row, listTerm.tk.col, SymIndex, listTerm.source())
|
||||
tk = NewToken(listTerm.tk.row, listTerm.tk.col, SymIndex, listTerm.Source())
|
||||
root = newTerm(tk)
|
||||
if err = tree.addTerm(root); err == nil {
|
||||
err = tree.addTerm(listTerm)
|
||||
|
||||
Reference in New Issue
Block a user