(idx0, idx1 file.Idx)
| 199 | } |
| 200 | |
| 201 | func (self *_parser) slice(idx0, idx1 file.Idx) string { |
| 202 | from := int(idx0) - self.base |
| 203 | to := int(idx1) - self.base |
| 204 | if from >= 0 && to <= len(self.str) { |
| 205 | return self.str[from:to] |
| 206 | } |
| 207 | |
| 208 | return "" |
| 209 | } |
| 210 | |
| 211 | func (self *_parser) parse() (*ast.Program, error) { |
| 212 | self.openScope() |
no outgoing calls