Esempio n. 1
0
func _newParser(filename, src string, base int) *_parser {
	return &_parser{
		chr:    ' ', // This is set so we can start scanning by skipping whitespace
		str:    src,
		length: len(src),
		base:   base,
		file:   file.NewFile(filename, src, base),
	}
}
Esempio n. 2
0
func _newParser(filename, src string, base int, sm *sourcemap.Consumer) *_parser {
	return &_parser{
		chr:      ' ', // This is set so we can start scanning by skipping whitespace
		str:      src,
		length:   len(src),
		base:     base,
		file:     file.NewFile(filename, src, base).WithSourceMap(sm),
		comments: ast.NewComments(),
	}
}
Esempio n. 3
0
func _newParser(filename, src string, base int) *_parser {
	return &_parser{
		chr:              ' ', // This is set so we can start scanning by skipping whitespace
		str:              src,
		length:           len(src),
		base:             base,
		file:             file.NewFile(filename, src, base),
		comments:         make([]*ast.Comment, 0),
		commentMap:       &ast.CommentMap{},
		skippedLineBreak: false,
	}
}