Skip to content

Commit

Permalink
export SKipFast
Browse files Browse the repository at this point in the history
  • Loading branch information
AsterDY committed Jan 21, 2024
1 parent 8396b06 commit b8b3e27
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ast/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -780,3 +780,13 @@ func (self Parser) ExportError(err types.ParsingError) error {
Code: err,
}.Description())
}

func SkipFast(src string, i int) (int, int, error) {
p := NewParserObj(src)
p.p = i
s, e := p.skipFast()
if e != 0 {
return -1, -1, p.ExportError(e)
}
return s, p.p, nil
}

0 comments on commit b8b3e27

Please sign in to comment.