textpow 0.9.1 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
 
@@ -25,10 +25,12 @@ module Textpow
25
25
  STDERR.puts "#{@line_marks}#{line}"
26
26
  end
27
27
 
28
- def start_parsing
28
+ def start_parsing name
29
+ STDERR.puts "{#{name}"
29
30
  end
30
31
 
31
- def end_parsing
32
+ def end_parsing name
33
+ STDERR.puts "}#{name}"
32
34
  end
33
35
  end
34
36
  end
@@ -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
 
@@ -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
- * `end_parsing`. Is called once after all the input text has been parsed.
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.9.1
7
- date: 2007-06-14 00:00:00 +02:00
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