Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: da248f2ab8e3
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d96ac073bbd2
Choose a head ref
  • 15 commits
  • 22 files changed
  • 1 contributor

Commits on Mar 27, 2015

  1. Copy the full SHA
    b6cbfa1 View commit details
  2. Lots of updates to ripper grammar (runs same untagged tests fine but …

    …needs lexer work and some bug fixage)
    enebo committed Mar 27, 2015
    Copy the full SHA
    3785127 View commit details
  3. Add missing tokens for lexer

    enebo committed Mar 27, 2015
    Copy the full SHA
    e4f0de2 View commit details
  4. Copy the full SHA
    535c7cc View commit details
  5. Copy the full SHA
    cf9e7b2 View commit details
  6. 1: invalid @ and @@ vars need to print out as chars and not ints 2: i…

    …nvalid char after @/@@ should raise invalid char
    enebo committed Mar 27, 2015
    Copy the full SHA
    9748c0d View commit details
  7. (ripper) 1: invalid @ and @@ vars need to print out as chars and not …

    …ints 2: invalid char after @/@@ should raise invalid char
    enebo committed Mar 27, 2015
    Copy the full SHA
    b264adf View commit details
  8. Copy the full SHA
    0f08400 View commit details
  9. Copy the full SHA
    9d945f9 View commit details
  10. make scanner_events for numeric types send proper events (new: on_ima…

    …ginary, on_rational)
    enebo committed Mar 27, 2015
    Copy the full SHA
    c9b0aa1 View commit details
  11. Copy the full SHA
    0c6e56c View commit details
  12. Raise exception on invalid gvar

    enebo committed Mar 27, 2015
    Copy the full SHA
    3951536 View commit details
  13. Copy the full SHA
    c1a1fc1 View commit details
  14. Copy the full SHA
    38fdb46 View commit details
  15. Copy the full SHA
    d96ac07 View commit details
31 changes: 31 additions & 0 deletions core/src/main/java/org/jruby/ext/ripper/ArgsTailHolder.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package org.jruby.ext.ripper;

import org.jruby.runtime.builtin.IRubyObject;

/**
* Simple struct to temporarily hold values during part of parsing.
*/
public class ArgsTailHolder {
private final IRubyObject keywordArgs;
private final IRubyObject keywordRestArg;
private final IRubyObject blockArg;

public ArgsTailHolder(IRubyObject keywordArgs, IRubyObject keywordRestArg, IRubyObject blockArg) {
this.keywordArgs = keywordArgs;
this.keywordRestArg = keywordRestArg;
this.blockArg = blockArg;

}

public IRubyObject getBlockArg() {
return blockArg;
}

public IRubyObject getKeywordArgs() {
return keywordArgs;
}

public IRubyObject getKeywordRestArg() {
return keywordRestArg;
}
}
5 changes: 4 additions & 1 deletion core/src/main/java/org/jruby/ext/ripper/HeredocTerm.java
Original file line number Diff line number Diff line change
@@ -139,7 +139,10 @@ public int parseString(RipperLexer lexer, LexerSource src) throws java.io.IOExce
if (pend < lexer.lex_pend) str.append('\n');
lexer.lex_goto_eol();
if (lexer.nextc() == -1) {
if (str != null) return error(lexer, len, str, eos);
if (str != null) {
str = null;
return error(lexer, len, str, eos);
}
}
} while(!lexer.whole_match_p(eos, indent));
} else {
Loading