Nathan Sobo
a02af2a51f
Add benchmark for TokenizedBuffer w/ new TextMateGrammar tokenization. SO SLOW!
2012-08-06 18:28:51 -06:00
Nathan Sobo
6878d19a6a
OnigRegExp.getCaptureTree does not include empty child captures
2012-08-06 18:27:39 -06:00
Nathan Sobo
a85345e392
Add OnigRegExp.getCaptureCount
2012-08-06 18:27:14 -06:00
Nathan Sobo
d495263b88
Update to 98aa644b of github's fork of cocoaoniguruma for captureCount method
2012-08-06 18:26:53 -06:00
Nathan Sobo
7bc6a5f24b
TextMateGrammar handles nested capture groups and trailing lookahead captures
...
Our previous implementation only allowed for a single layer of capture groups. Now we can have captures within captures. I achieved this by converting the match into a tree before generating tokens. If there are any capture scopes specified, then we will always emit a token for every capture group in the match. This may create some redundant tokens (a serious of 2 or more tokens with the same scopes), but it will at least be technically correct. I think the overhead of removing these redundancies exceeds the cost of maintaining them for now.
2012-08-06 16:35:33 -06:00
Nathan Sobo
0d6d16a438
Move TextMateGrammar.buildCaptureTree to .getCaptureTree method on OnigRegExp
2012-08-06 11:43:44 -06:00
Nathan Sobo
32fc042929
Add TextMateGrammar.buildCaptureTree, which organizes nested captures in a tree
...
This will be a weapon in dealing with capture groups that nest within other capture groups, and also helps deal with trailing lookahead groups that don't belong in the main match. I made it a class method because it's stateless and that made it easier to test.
2012-08-03 23:52:58 -06:00
Nathan Sobo
fd28a3577a
Improve spec description
2012-08-03 23:51:14 -06:00
Corey Johnson & Nathan Sobo
0e1d3fe3a9
wip: fixing capture group problems
2012-08-03 11:38:45 -07:00
Corey Johnson & Nathan Sobo
1a243adfcf
All specs pass w/ TextMateGrammar for tokenization (auto-indent disabled)
2012-08-03 12:00:05 -06:00
Corey Johnson
08a55dfcac
wip: IndentationForRow almost works TextMate preferences
2012-08-02 17:02:17 -07:00
Corey Johnson
82562c89dd
Name onig-reg-exp-spec correctly
2012-08-02 16:25:34 -07:00
Corey Johnson
2d3e2b53a3
Passes TextMateBundle spec
2012-08-02 13:23:15 -07:00
Corey Johnson & Nathan Sobo
9ca4c2c347
WIP: Loading TextMate Bundle preferences globally
2012-08-02 13:04:43 -06:00
Corey Johnson
b378620c54
Add TextMateBundle which handles all bundle loading
2012-08-02 11:38:14 -07:00
Corey Johnson
81f83482b0
Rename File.getName and Directory.getName to .getBaseName
2012-08-02 11:37:49 -07:00
Corey Johnson
114847fb0f
Update display buffer spec
2012-08-02 10:25:55 -07:00
Corey Johnson & Nathan Sobo
0a97cb0590
Tokenized buffer uses TextMate grammar
2012-08-02 10:05:09 -07:00
Corey Johnson & Nathan Sobo
b50b8eacca
wip: hooking up tokenized buffer to textmate grammars
2012-08-01 17:54:08 -07:00
Corey Johnson & Nathan Sobo
0cdc042e71
Use text as the default grammar
2012-08-01 17:24:28 -07:00
Corey Johnson & Nathan Sobo
e6bc0e092a
Add javascript bundle
2012-08-01 17:18:43 -07:00
Corey Johnson & Nathan Sobo
1d70e2e85b
Add bundles for coffeeScript and ruby
2012-08-01 17:16:01 -07:00
Corey Johnson & Nathan Sobo
627a75b9c6
Removing submodules
2012-08-01 17:14:13 -07:00
Corey Johnson & Nathan Sobo
058f63c01f
load all bundle grammars in window.startup
2012-08-01 17:09:29 -07:00
Corey Johnson & Nathan Sobo
370e0b896e
Add TextMateGrammar.loadFromBundles()
2012-08-01 16:58:31 -07:00
Corey Johnson & Nathan Sobo
1ea5380ca6
add ruby bundle submodule
2012-08-01 16:18:02 -07:00
Corey Johnson & Nathan Sobo
430fc0eff1
Put a bit more space between editor lines
2012-08-01 17:16:15 -06:00
Nathan Sobo
6de055aa1c
Lines aren't taller when they contain an Inconsolata em dash (–) character
2012-08-01 17:04:33 -06:00
Corey Johnson & Nathan Sobo
98ef3e4243
Start on TextMateTheme object
2012-08-01 16:27:32 -06:00
Nathan Sobo
238fecb766
💄
2012-08-01 14:11:39 -06:00
Nathan Sobo
13c95aae31
Add 'themes' directory with the default TextMate themes
2012-08-01 14:07:18 -06:00
Nathan Sobo
cdf20c7a15
Rename Parser to TextMateTokenizer
2012-08-01 13:58:38 -06:00
Corey Johnson & Nathan Sobo
fc1228619e
Add spec for interpolated strings inside of interpolated strings
2012-08-01 11:49:45 -07:00
Corey Johnson & Nathan Sobo
487c4ed439
$self includes work
2012-08-01 11:45:30 -07:00
Corey Johnson & Nathan Sobo
bccd525084
Handle includes
2012-08-01 11:05:37 -07:00
Corey Johnson & Nathan Sobo
fceb9e16f9
remove log statement
2012-08-01 10:52:51 -07:00
Corey Johnson & Nathan Sobo
594e27b057
Parser maintains a stack of rules, which begin/end patterns mutate
2012-08-01 10:47:40 -07:00
Corey Johnson & Nathan Sobo
fbdebd644d
Revert "Handle patterns that include other patterns from the grammar repository"
...
This reverts commit 64795c032306200f05ce3b262fe58adc86e06b34.
2012-08-01 09:48:40 -07:00
Corey Johnson & Nathan Sobo
62dc3a1e8f
Revert "Replace includes with the patterns to which they refer "
...
This reverts commit e7add6472bda071734348dcdd48a6435d685209d.
2012-08-01 09:48:40 -07:00
Corey Johnson & Nathan Sobo
b56c4dda43
Replace includes with the patterns to which they refer
2012-08-01 09:48:40 -07:00
Corey Johnson & Nathan Sobo
62c5da760c
Handle patterns that include other patterns from the grammar repository
2012-08-01 09:48:40 -07:00
Corey Johnson & Nathan Sobo
6af22fce67
Add specs for begin/end patterns with nested patterns.
2012-08-01 09:48:39 -07:00
Corey Johnson & Nathan Sobo
289b15d032
Create an object-model of the TextMate grammar with methods for the parser
2012-08-01 09:48:39 -07:00
Corey Johnson & Nathan Sobo
0b9d6d4d9b
💄
2012-08-01 09:48:39 -07:00
Corey Johnson & Nathan Sobo
aa02785d67
Parser handles patterns w/ begin/end regexes (if begin/end are on the same line)
2012-08-01 09:48:38 -07:00
Nathan Sobo
58510c2cc4
Release compiled oniguruma regex in destructor of user data object
2012-08-01 09:48:38 -07:00
Nathan Sobo
7682f586be
Parser can tokenize lines containing simple tokens (no nested scopes yet)
2012-08-01 09:48:37 -07:00
Corey Johnson & Nathan Sobo
a2a58a3506
TextMate parser can parse single plain tokens / tokens with captures
2012-08-01 09:48:37 -07:00
Corey Johnson & Nathan Sobo
757258dd98
Include 'indices' property on OnigRegExp result with capture group indices
2012-08-01 09:48:37 -07:00
Corey Johnson & Nathan Sobo
7067c35dc0
Add CocoaOniguruma
2012-08-01 09:48:36 -07:00