summaryrefslogtreecommitdiff
path: root/lib/irb/ruby-lex.rb
AgeCommit message (Collapse)Author
2019-07-02Keyword token that follows EXPR_FNAME must be a method nameaycabta
2019-06-28Remove auto indent of continuation lineaycabta
2019-06-28Removed unused variableNobuyoshi Nakada
2019-06-27EXPR_LABEL also indicates non-continuation lineaycabta
Example: [ 1, # this is not continuation line 2 ]
2019-06-27EXPR_CMDARG also indicates the end of an expressionaycabta
2019-06-27Increase indent of continuation lineaycabta
v = 3 # auto indent
2019-06-26Decrease nesting level when closing token comes at a non-first token of lineaycabta
2019-06-26`ensure` is not a continuos lineNobuyoshi Nakada
2019-06-26Decrease indent at "elsif" tooNobuyoshi Nakada
2019-06-26Remove other debug printsNobuyoshi Nakada
2019-06-26Remove debug print...sorryaycabta
2019-06-25Treat auto indent with newline correctlyaycabta
2019-06-25Decrease indent when "else", "rescue", "ensure", "when", or "in" comeaycabta
2019-06-25Refactor calculation of corresponding token depthaycabta
2019-06-22Treat closing token with starting token at head of 2nd line correctlyaycabta
v = if true # starting token at head of 2nd line 3 end # closing token
2019-06-22Do auto indent only when closing token at first of lineaycabta
if true 3; end # this isn't auto-indented
2019-06-21Support irregular auto indentaycabta
v = if true 3 end # this "end" is auto-indented correctly
2019-06-19Use IRB.conf[:AUTO_INDENT] setting in multiline modeaycabta
2019-06-18Fix auto indent crash when blank inputaycabta
2019-06-18Implement auto indent for multilineaycabta
2019-06-16Implement line_no correctlyaycabta
2019-06-14Use Reline.prompt_proc in IRBaycabta
2019-06-13make sync-default-gems GEM=irbTakashi Kokubun
Upgrade IRB to https://github.com/ruby/irb/commit/41ea43a4a732e094acfa1b0fc1473fdcda9e6227 Mostly backport changes.
2019-06-12Treat "begin rescue end" correctlyaycabta
2019-05-30Check the end token of heredoc correctlyaycabta
2019-05-28Treat :@1, :@@1, @1, and @@1 correctly to check terminationaycabta
2019-05-28Supress duplicated warningKazuki Tsujimoto
2019-05-27Use IRB::InputMethod#eof? to quitaycabta
2019-05-27Support op, cvar, iver, gvar and kw that follow on symbeg in IRBaycabta
2019-05-25JSON like label ends by differs from the startaycabta
pp Ripper.lex('{ "a": 3 }') => [[[1, 0], :on_lbrace, "{", EXPR_BEG|EXPR_LABEL], [[1, 1], :on_sp, " ", EXPR_BEG|EXPR_LABEL], [[1, 2], :on_tstring_beg, "\"", EXPR_BEG|EXPR_LABEL], [[1, 3], :on_tstring_content, "a", EXPR_BEG|EXPR_LABEL], [[1, 4], :on_label_end, "\":", EXPR_BEG|EXPR_LABEL], [[1, 6], :on_sp, " ", EXPR_BEG|EXPR_LABEL], [[1, 7], :on_int, "3", EXPR_END], [[1, 8], :on_sp, " ", EXPR_END], [[1, 9], :on_rbrace, "}", EXPR_END]]
2019-05-25Use Reline as Reidline multiline editor in IRBaycabta
2019-05-21Symbol beginning token may take a constant tokenaycabta
2019-05-21IRB should eval and show an error when only `.` is inputtedaycabta
2019-04-30Use Ripper for IRBaycabta
The debug option of IRB is deleted because it's just for IRB's pure Ruby parser.
2019-04-23Revert "IRB is improved with Reline and RDoc, take 2"Nobuyoshi Nakada
Accidentally merged when 89271d4a3733bc5e70e9c56b4bd12f277e699c42 "Adjusted indents".
2019-04-23IRB is improved with Reline and RDoc, take 2aycabta
2019-04-21Revert "IRB is improved with Reline and RDoc"aycabta
This reverts commit 7f273ac6d0f05208b5b228da95205e20c0e8286c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-20IRB is improved with Reline and RDocaycabta
Reline is a readline stdlib compatible library. It also supports multiline input. IRB is improved with Reline and supports multiline. Besides, supports showing documents when completed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-02lib/*: Prefer require_relative over require, remove explicit extensionmarcandre
[#15206] [Fix GH-1976] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-02lib/*: Prefer require_relative over require.marcandre
[#15206] [Fix GH-1976] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20ruby-lex.rb: fix continued line conditionsnobu
* lib/irb/ruby-lex.rb (RubyLex#lex): fix conditions for continued line; empty lines, a semicolon, first line in `begin` block, just after `else` are not continued. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20ruby-lex.rb: merge regexpsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-08ruby-lex.rb: fix for labelnobu
* lib/irb/ruby-lex.rb (identify_identifier): treat identifier just followed by a colon as a lable. this is not a precise solution but enough for the time being. [ruby-core:78526] [Bug #13012] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-18* lib/irb/ruby-lex.rb: fixed parse error for striped heredocument syntax.hsbt
[fix GH-1127] Patch by @koic git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-24* lib/e2mmap.rb: remove needless instance variables.hsbt
* lib/irb.rb: ditto. * lib/irb/**/*.rb: ditto. * lib/shell.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-09* lib/irb.rb: removed commented-out code.hsbt
* lib/irb/**/*.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-09* lib/cmath.rb: fixed indent.hsbt
* lib/drb/ssl.rb: ditto. * lib/irb/**/*.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-08 * lib/irb/ruby-lex.rb: fix counting indent in identify_string_dvar.keiju
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-27 * lib/irb/ruby-lex.rb: make lex_state to EXPR_END when next tokenkeiju
is an operator after SYMBEG [Bug #6378]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e