|
|
|
|
|
by vidarh
1581 days ago
|
|
Depends on the analysis. For bracket pairing and quite a bit of analysis you can avoid it quite easily by storing the state of a parser at intervals. E.g.for syntax highlighting I use Rouge augmented with serialization of the lexer state, which also provides enough state for bracket matching and the internal state I need to store is typically one symbol every few lines. For complex analysis of the code-base, sure, you may want to build an AST. For my part I have no interest in having that functionality in-process in the editor - I'd rather have that provided by an external service. |
|
How? You have a bracket `[` at start of 2GB file and the closing bracket `]` somewhere at end at end of the file.
Without analysis you can't tell where it is.