• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Ruby GTK3移行後のメインリポジトリ


Commit MetaInfo

Revisão181e975fc1fd6943c24c47a8aba3bba8b9ac8cfb (tree)
Hora2016-01-04 05:11:38
AutorShyouzou Sugitani <shy@user...>
CommiterShyouzou Sugitani

Mensagem de Log

update misaka.rb

Mudança Sumário

Diff

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
1+Mon January 4 2015 Shyouzou Sugitani <shy@users.osdn.me>
2+ * 美坂互換モジュールのLexerクラスの動作速度を改善した.
3+
14 Sun January 3 2015 Shyouzou Sugitani <shy@users.osdn.me>
25 * シグナル処理のコールバックブロックの戻り値を明示的に与えるようにした.
36 * otherghostnameイベントの引数が間違っていたのを修正した.
--- a/lib/ninix/dll/misaka.rb
+++ b/lib/ninix/dll/misaka.rb
@@ -195,20 +195,19 @@ module Misaka
195195 end
196196
197197 def _match(data, line, column, path)
198- pos = 0
199- end_ = data.length
200- while pos < end_
198+ temp = data.clone
199+ while temp.length > 0
201200 if column == 0
202- match = Re_comment.match(data[pos..-1])
201+ match = Re_comment.match(temp)
203202 if match != nil
204203 column = column + match[0].length
205- pos += match.end(0)
204+ temp = match.post_match
206205 next
207206 end
208207 end
209208 break_flag = false
210209 for token, pattern in Patterns
211- match = pattern.match(data[pos..-1])
210+ match = pattern.match(temp)
212211 if match != nil
213212 lexeme = match[0]
214213 if token == TOKEN_TEXT and \
@@ -222,13 +221,13 @@ module Misaka
222221 else
223222 @buffer << [token, lexeme, [line, column]]
224223 end
225- pos += match.end(0)
224+ temp = match.post_match
226225 break_flag = true
227226 break
228227 end
229228 end
230229 if not break_flag
231- ###print(data[pos..pos + 100 - 1])
230+ ###print(temp[0..100 - 1])
232231 Misaka.lexical_error(:path => path, :position => [line, column])
233232 end
234233 if token == TOKEN_NEWLINE