// inverseAndProgram : INVERSE program func (p *parser) parseInverseAndProgram() *ast.Program { // INVERSE tok := p.shift() // program result := p.parseProgram() result.Strip = ast.NewStripForStr(tok.Val) return result }
// COMMENT func (p *parser) parseComment() *ast.CommentStatement { // COMMENT tok := p.shift() value := rOpenComment.ReplaceAllString(tok.Val, "") value = rCloseComment.ReplaceAllString(value, "") result := ast.NewCommentStatement(tok.Pos, tok.Line, value) result.Strip = ast.NewStripForStr(tok.Val) return result }