Пример #1
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(),
	}
}
Пример #2
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: ast.NewComments(),
	}
}