Merge branch 'dev' of ssh://gitea.xintech.co:2222/zhouzhihong/lexmachine into dev

This commit is contained in:
zhouzhihong 2022-08-26 14:49:21 +08:00
commit 95e26e7aae

View File

@ -55,7 +55,20 @@ func (t *Token) Equals(other *Token) bool {
// String formats the token in a human readable form. // String formats the token in a human readable form.
func (t *Token) String() string { func (t *Token) String() string {
return fmt.Sprintf("%d %q %d (%d, %d)-(%d, %d)", t.Type, t.Value, t.TC, t.StartLine, t.StartColumn, t.EndLine, t.EndColumn) return fmt.Sprintf(
"%d %q %d (%d, %d)-(%d, %d) (%d, %d)-(%d, %d)",
t.Type,
t.Value,
t.TC,
t.StartLine,
t.StartColumn,
t.EndLine,
t.EndColumn,
t.TSLine,
t.TSColumn,
t.TELine,
t.TEColumn,
)
} }
// An Action is a function which get called when the Scanner finds a match // An Action is a function which get called when the Scanner finds a match