(copy)
| 6795 | // Utility for getTokenAt and getLineTokens |
| 6796 | function takeToken(cm, pos, precise, asArray) { |
| 6797 | function getObj(copy) { |
| 6798 | return {start: stream.start, end: stream.pos, |
| 6799 | string: stream.current(), |
| 6800 | type: style || null, |
| 6801 | state: copy ? copyState(doc.mode, state) : state}; |
| 6802 | } |
| 6803 | |
| 6804 | var doc = cm.doc, mode = doc.mode, style; |
| 6805 | pos = clipPos(doc, pos); |