textpow 0.9.1 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +3 -0
- data/lib/textpow/debug_processor.rb +4 -2
- data/lib/textpow/syntax.rb +2 -2
- data/mm/manual.mm +6 -4
- metadata +2 -2
data/History.txt
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
== 0.10.0 / 2007-06-15
|
2
|
+
* CHANGE: Now the scopeName for the entire syntax is passed to start_parsing and end_parsing. This means that programs using older version should modify their processors accordingly.
|
3
|
+
|
1
4
|
== 0.9.1 / 2007-06-14
|
2
5
|
* FIX: Score manager now handles multiple subtractions in scope definitions.
|
3
6
|
|
data/lib/textpow/syntax.rb
CHANGED
@@ -111,12 +111,12 @@ module Textpow
|
|
111
111
|
end
|
112
112
|
|
113
113
|
def parse( string, processor = nil )
|
114
|
-
processor.start_parsing if processor
|
114
|
+
processor.start_parsing self.scopeName if processor
|
115
115
|
stack = [[self, nil]]
|
116
116
|
string.each_line do |line|
|
117
117
|
parse_line stack, line, processor
|
118
118
|
end
|
119
|
-
processor.end_parsing if processor
|
119
|
+
processor.end_parsing self.scopeName if processor
|
120
120
|
processor
|
121
121
|
end
|
122
122
|
|
data/mm/manual.mm
CHANGED
@@ -218,10 +218,10 @@ class Processor
|
|
218
218
|
def new_line line
|
219
219
|
end
|
220
220
|
|
221
|
-
def start_parsing
|
221
|
+
def start_parsing name
|
222
222
|
end
|
223
223
|
|
224
|
-
def end_parsing
|
224
|
+
def end_parsing name
|
225
225
|
end
|
226
226
|
end
|
227
227
|
---------------------------------
|
@@ -231,8 +231,10 @@ end
|
|
231
231
|
* `close_tag`. The same that `open_tag`, but it is called when a tag is closed.
|
232
232
|
* `new_line`. Is called every time that a new line is processed, it receives the
|
233
233
|
line's contents.
|
234
|
-
* `start_parsing`. Is called once at the beginning of the parsing process.
|
235
|
-
|
234
|
+
* `start_parsing`. Is called once at the beginning of the parsing process. It
|
235
|
+
receives the scope name for the syntax being used.
|
236
|
+
* `end_parsing`. Is called once after all the input text has been parsed. It
|
237
|
+
receives the scope name for the syntax being used.
|
236
238
|
|
237
239
|
Textpow ensures that the methods are called in parsing order, thus,
|
238
240
|
for example, if there are two subsequent calls to `open_tag`, the first
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: textpow
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.
|
7
|
-
date: 2007-06-
|
6
|
+
version: 0.10.0
|
7
|
+
date: 2007-06-18 00:00:00 +02:00
|
8
8
|
summary: An engine for parsing Textmate bundles
|
9
9
|
require_paths:
|
10
10
|
- lib
|