summaryrefslogtreecommitdiff
path: root/lib/irb
AgeCommit message (Collapse)Author
2019-07-06Fix showing document of ClassName.method_name in IRBaycabta
In IRB, Time.new is split as "Time", ".", and "new". The receiver "Time" is processed by #class method but it means that "Time" changes to "Class". This commit fixes it.
2019-07-03Check code_block_open for whether code continuesaycabta
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-27bc mode is already removed [ci skip]Kazuhiro NISHIYAMA
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-12Ripper::Lexer: fallback parse error token to the previous oneNobuyoshi Nakada
2019-06-12Treat "begin rescue end" correctlyaycabta
2019-06-10irb/cmd/help.rb: return nil after the redefinitionNobuyoshi Nakada
2019-06-10irb: defer requiring rdoc to improve the start up timeNobuyoshi Nakada
2019-06-04Reflect behavior changes to argument nameTakashi Kokubun
0c459af7c233adb5f44022350bfe8fa132d8053e changed the meaning of `detect_compile_error`, and this commit lets it follow the change.
2019-06-04colorize_code must return escaped textTakashi Kokubun
This was needed before 0c459af7c233adb5f44022350bfe8fa132d8053e but it could be actually useless now. But I added this anyway just in case.
2019-06-04Colorize error charactersNobuyoshi Nakada
* lib/irb/color.rb (IRB::Color.scan): ignore "incomplete end of input" error only, to colorize invalid characters, e.g., control characters, and invalid symbols, as errors.
2019-05-31Bump irb version to 1.1.0.pre.1.Hiroshi SHIBATA
Becausee the current irb support reline and have many of changes.
2019-05-31Fix typo :bug: [ci skip]Takashi Kokubun
2019-05-31Warn compile_error only when input is finishedTakashi Kokubun
Let's say we are in progress to write `"foo"`: ``` irb> "fo ``` at this moment, nothing is wrong. It would be just a normal way to write `"foo"`. Prior to this commit, the `fo` part was warned because of 5b64d7ac6e7cbf759b859428f125539e58bac0bd. But I think warning such a normal input is not valuable for users. However, we'd like to warn `:@1` or `@@1` which is also a syntax error. Then this commit switches the syntax highlight based on whether the input text is finished or not. When it's not finished yet, it does not warn compile_error.
2019-05-31Abstract away Ripper::Lexer#scan in IRB::Color#scanTakashi Kokubun
because 5b64d7ac6e7cbf759b859428f125539e58bac0bd made it hard to understand #colorize_code for me and this change is needed for my next commit.
2019-05-30Do not rely on IRB.conf[:MAIN_CONTEXT] before initializeTakashi Kokubun
so that we can colorize binding.irb source lines.
2019-05-30Check the end token of heredoc correctlyaycabta
2019-05-29Colorize errors moreNobuyoshi Nakada
* lib/irb/color.rb (IRB::Color.colorize_code): colorize `compile_error` part as same as `on_parse_error`.
2019-05-29Get rid of nested string interpolationsNobuyoshi Nakada
* lib/irb/color.rb (IRB::Color.colorize): get rid of nesting string interpolations not to confuse ruby-mode.el
2019-05-29ripper: Ripper::Lexer#scanNobuyoshi Nakada
* ext/ripper/lib/ripper/lexer.rb (Ripper::Lexer#scan): parses the code and returns the result elements including errors. [EXPERIMENTAL]
2019-05-29Colorize compile_error as same as on_parse_errorNobuyoshi Nakada
2019-05-29parse.y: flush invalid charNobuyoshi Nakada
2019-05-29Revert "Colorize error part more"Koichi Sasada
This reverts commit c7f3c222c9b82736c993419daa6bfb643e5c0793.
2019-05-29Colorize error part moreNobuyoshi Nakada
Colorize `compile_error` parts as well as `on_parse_error` parts.
2019-05-29Use IO.copy_streamaycabta
2019-05-29Check RUBY_YES_I_AM_NOT_A_NORMAL_USER env to access RubyVM docaycabta
2019-05-29IRB never show RubyVM's docaycabta
2019-05-29Encode completed strings corecctlyaycabta