diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-04-30 17:54:55 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-04-30 17:54:55 +0000 |
commit | 859a7a92775a84f118a063e5afba4580c7d6d0df (patch) | |
tree | 62732b6945b603c1760c07620f7dc3acafc99492 /lib/irb/ruby-lex.rb | |
parent | f8ab487e4d60a14dd7f807ab146168d9d034a6ea (diff) |
Merge from irb 0.7.3.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb/ruby-lex.rb')
-rw-r--r-- | lib/irb/ruby-lex.rb | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb index 24db325214..5b37013361 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -1,9 +1,9 @@ # -# ruby-lex.rb - ruby lexcal analizer -# $Release Version: 0.6$ +# irb/ruby-lex.rb - ruby lexcal analizer +# $Release Version: 0.7.3$ # $Revision$ # $Date$ -# by Keiju ISHITSUKA(Nippon Rational Inc.) +# by Keiju ISHITSUKA([email protected]) # # -- # @@ -202,8 +202,8 @@ class RubyLex @space_seen = false @here_header = false - prompt @continue = false + prompt @line = "" @exp_line_no = @line_no @@ -239,8 +239,8 @@ class RubyLex until (((tk = token).kind_of?(TkNL) || tk.kind_of?(TkEND_OF_SCRIPT)) && !@continue or tk.nil?) - # p tk - # p self + #p tk + #p self end line = get_readed # print self.inspect @@ -333,7 +333,7 @@ class RubyLex until peek_equal?("=end") && peek(4) =~ /\s/ until getc == "\n"; end end - getc; getc; getc; getc + gets @ltype = nil Token(TkRD_COMMENT) end @@ -459,6 +459,7 @@ class RubyLex identify_number else # for obj.if + # (JP: obj.if $B$J$I$NBP1~(B) @lex_state = EXPR_DOT Token(TkDOT) end @@ -691,7 +692,8 @@ class RubyLex if ch == "!" or ch == "?" token.concat getc end - # fix token + # almost fix token + # (JP: $BBgBN(Bfix token) case token when /^\$/ @@ -707,11 +709,13 @@ class RubyLex token_c, *trans = TkReading2Token[token] if token_c # reserved word? + # (JP: $BM=Ls8l$+$I$&$+(B?) if (@lex_state != EXPR_BEG && @lex_state != EXPR_FNAME && trans[1]) # modifiers + # (JP: $B=$>~;R(B) token_c = TkSymbol2Token[trans[1]] @lex_state = trans[0] else @@ -752,6 +756,7 @@ class RubyLex def identify_here_document ch = getc +# if lt = PERCENT_LTYPE[ch] if ch == "-" ch = getc indent = true @@ -954,7 +959,8 @@ class RubyLex read_escape(chrs) end else - # other characters + # other characters + #(JP:$B$=$NB>$NJ8;z(B) end end end |