aboutsummaryrefslogtreecommitdiffstats
path: root/ext/ripper
Commit message (Collapse)AuthorAgeFilesLines
* sed -i '/r_cast.h/d'卜部昌平2020-08-271-1/+0
|
* sed -i '\,2/extern.h,d'卜部昌平2020-08-271-1/+0
|
* Allow references to $$ in Ripper DSLNobuyoshi Nakada2020-05-291-0/+3
|
* sed -i 's|ruby/impl|ruby/internal|'卜部昌平2020-05-111-140/+140
| | | | To fix build failures.
* sed -i s|ruby/3|ruby/impl|g卜部昌平2020-05-111-140/+140
| | | | This shall fix compile errors.
* Suppress warnings by gcc 10.1.0-RC-20200430Nobuyoshi Nakada2020-05-041-1/+9
| | | | | | | | | | | | | | | | | | | | | | * Folding results should not be empty. If `OnigCodePointCount(to->n)` were 0, `for` loop using `fn` wouldn't execute and `ncs` elements are not initialized. ``` enc/unicode.c:557:21: warning: 'ncs[0]' may be used uninitialized in this function [-Wmaybe-uninitialized] 557 | for (i = 0; i < ncs[0]; i++) { | ~~~^~~ ``` * Cast to `enum yytokentype` Additional enums for scanner events by ripper are not included in `yytokentype`. ``` ripper.y:7274:28: warning: implicit conversion from 'enum <anonymous>' to 'enum yytokentype' [-Wenum-conversion] ```
* Merge pull request #2991 from shyouhei/ruby.h卜部昌平2020-04-081-1/+152
| | | Split ruby.h
* Workaround for bison provided by scoop on mswin environmentHiroshi SHIBATA2020-02-151-0/+1
|
* Get rid of use of special variablesJeremy Evans2020-01-201-6/+6
| | | | | Use `"\n"` and `IO#fileno` instead of `$/` and `$.` respectively. [Feature #14240]
* Update dependencies in makefiles againKazuhiro NISHIYAMA2020-01-171-0/+1
| | | | patch from https://travis-ci.org/ruby/ruby/jobs/638231960
* Updated dependencies on internal/warnings.hNobuyoshi Nakada2019-12-311-0/+1
| | | | | Needed for `UNALIGNED_MEMBER_ACCESS` using `COMPILER_WARNING_`* macros.
* update dependencies卜部昌平2019-12-261-0/+28
|
* Allow `$10` and more in the Ripper DSLNobuyoshi Nakada2019-11-261-7/+4
|
* Update dependenciesNobuyoshi Nakada2019-11-181-1/+0
|
* Update comment of Ripper.lexYuichiro Kaneko2019-11-131-10/+10
| | | | This is follow up of 1f7cb4bee9.
* Revert "Method reference operator"Nobuyoshi Nakada2019-11-121-1/+0
| | | | | This reverts commit 67c574736912003c377218153f9d3b9c0c96a17b. [Feature #16275]
* Remove unneeded exec bits from some filesDavid Rodríguez2019-11-094-0/+0
| | | | | | | | | | | | | I noticed that some files in rubygems were executable, and I could think of no reason why they should be. In general, I think ruby files should never have the executable bit set unless they include a shebang, so I run the following command over the whole repo: ```bash find . -name '*.rb' -type f -executable -exec bash -c 'grep -L "^#!" $1 || chmod -x $1' _ {} \; ```
* Suppress unused variable warningNobuyoshi Nakada2019-11-071-1/+1
|
* * expand tabs. [ci skip]git2019-10-211-155/+155
| | | | | Tabs were expanded because previously the file did not have any tab indentation. Please update your editor config, and use misc/expand_tabs.rb in the pre-commit hook.
* Look up event ID offsets by token as indexNobuyoshi Nakada2019-10-211-168/+164
|
* Also BDOT2 and BDOT3 are operatorsNobuyoshi Nakada2019-10-201-0/+2
|
* Extend Ripper DSL to set to pseudo variables other than `$$`Nobuyoshi Nakada2019-10-191-4/+6
|
* Changed numbered parameter prefixNobuyoshi Nakada2019-09-241-3/+0
|
* [DOC] Update output of Ripper.sexp [ci skip]Kazuhiro NISHIYAMA2019-09-071-1/+1
|
* Revert "Add pipeline operator [Feature #15799]"Nobuyoshi Nakada2019-08-291-1/+0
| | | | | | | | | | | | | This reverts commits: * d365fd5a024254d7c105a62a015a7ea29ccf3e5d * d780c3662484d6072b3a6945b840049de72c2096 * aa7211836b769231a2a8ef6b6ec2fd0ec882ef29 * 043f010c28e82ea38978bf8ed885416f133b5b75 * bb4dd7c6af05c7821d572e2592ea3d0cc748d81f * 043f010c28e82ea38978bf8ed885416f133b5b75 * f169043d81524b5b529f2c1e9c35437ba5bc3a7a http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/94645
* ext/ripper/lib/ripper/lexer.rb: Consistently use `Array#push`Yusuke Endoh2019-08-071-1/+1
| | | | instead of <<. All the other callsites use `push`.
* ext/ripper/lib/ripper/lexer.rb: fix a wrong delegationYusuke Endoh2019-08-071-1/+1
| | | | The target method name is a typo.
* Include ruby/assert.h in ruby/ruby.h so that assertions can be thereNobuyoshi Nakada2019-07-141-0/+1
|
* Show the parser states in pretty_print tooNobuyoshi Nakada2019-06-271-0/+2
|
* Support Bison 3 in ripperNobuyoshi Nakada2019-06-171-0/+1
|
* Prefer `enum yytokentype` to intNobuyoshi Nakada2019-06-151-2/+2
|
* Add pipeline operator [Feature #15799]Nobuyoshi Nakada2019-06-131-0/+1
|
* Ripper::Lexer: fallback parse error token to the previous oneNobuyoshi Nakada2019-06-121-1/+11
|
* Include stack elements left after errorsNobuyoshi Nakada2019-05-301-1/+1
|
* ripper: Ripper::Lexer#scanNobuyoshi Nakada2019-05-291-4/+29
| | | | | | * ext/ripper/lib/ripper/lexer.rb (Ripper::Lexer#scan): parses the code and returns the result elements including errors. [EXPERIMENTAL]
* Fix typos in Ripper::Lexer#inspect and Ripper::Lexer#pretty_printNobuyoshi Nakada2019-05-281-2/+2
|
* Added #inspect and #pretty_inspect to Ripper::Lexer::ElemNobuyoshi Nakada2019-05-271-1/+16
|
* Ripper: no documents of fallback methodsNobuyoshi Nakada2019-05-221-0/+2
|
* Introduce pattern matching [EXPERIMENTAL]ktsj2019-04-171-1/+1
| | | | | | [ruby-core:87945] [Feature #14912] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Numbered parameters [Feature #4475]nobu2019-03-171-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add ignored_sp eventnobu2019-03-091-0/+6
| | | | | | | | * ext/ripper/lib/ripper/lexer.rb (Ripper::Lexer): add ignored_sp event which will be fired from Ripper::Lexer#on_heredoc_dedent method. [ruby-core:91727] [Bug #15648] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fixed build failure of Travis CI. We need to support `make srcs`.hsbt2019-03-011-2/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Support YACC environment variable for ripper.hsbt2019-03-012-3/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Removed moving toplevel header since r12501nobu2019-02-081-1/+1
| | | | | | | Moving public headers was 12-years ago, no depend files would expect ruby.h in the top source directory now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Method reference operatornobu2018-12-311-0/+1
| | | | | | | | Introduce the new operator for method reference, `.:`. [Feature #12125] [Feature #13581] [EXPERIMENTAL] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use delete_prefix instead of `sub(/\Afixed-pattern/, '')`kazu2018-12-041-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* UNREACHABLE_RETURNnobu2018-07-241-1/+1
| | | | | | | * include/ruby/ruby.h (UNREACHABLE_RETURN): UNREACHABLE at the end of non-void functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove flip-flop usages from build scriptsmame2018-06-151-10/+17
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix FrozenError on `Ripper.slice`k0kubun2018-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently `Ripper.slice` raises a FrozenError ```ruby require 'ripper' p Ripper.slice('foo', 'ident') ``` ``` /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:193:in `concat': can't modify frozen String (FrozenError) from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:193:in `block in compile' from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:190:in `scan' from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:190:in `compile' from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:169:in `initialize' from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:151:in `new' from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:151:in `token_match' from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:144:in `slice' from /tmp/tmp.kb4cnhvum2/test.rb:2:in `<main>' ``` This patch will fix the problem. [Fix GH-1837] From: Masataka Pocke Kuwabara <kuwabara@pocke.me> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ripper: fix escaped spacenobu2018-03-121-9/+10
| | | | | | | | | * parse.y: use tSP same as ripper instead of tSPACE. [ruby-core:86080] [Bug #14597] * ext/ripper/eventids2.c: tSP is defined in ripper.c now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e