(copy)
| 6770 | // Utility for getTokenAt and getLineTokens |
| 6771 | function takeToken(cm, pos, precise, asArray) { |
| 6772 | function getObj(copy) { |
| 6773 | return {start: stream.start, end: stream.pos, |
| 6774 | string: stream.current(), |
| 6775 | type: style || null, |
| 6776 | state: copy ? copyState(doc.mode, state) : state}; |
| 6777 | } |
| 6778 | |
| 6779 | var doc = cm.doc, mode = doc.mode, style; |
| 6780 | pos = clipPos(doc, pos); |