@SuppressWarnings("unchecked") public Node parse(String file, byte[] content, DynamicScope blockScope, ParserConfiguration configuration) { RubyArray list = getLines(configuration, runtime, file); LexerSource lexerSource = LexerSource.getSource(file, content, list, configuration); return parse(file, lexerSource, blockScope, configuration); }
public long getTotalParsedBytes() { Ruby runtime = ruby.get(); if (runtime == null) return 0; return runtime.getParser().getTotalBytes(); }
public double getTotalParseTime() { Ruby runtime = ruby.get(); if (runtime == null) return 0; return runtime.getParser().getTotalTime() / 1000000000.0; }
@Deprecated public Node parse(String content, String file, DynamicScope scope, int lineNumber, boolean extraPositionInformation) { return parser.parse(file, content.getBytes(), scope, new ParserConfiguration(this, lineNumber, extraPositionInformation, false, true, config)); }
@Deprecated public Node parse(String content, String file, DynamicScope scope, int lineNumber, boolean extraPositionInformation) { return parser.parse(file, content.getBytes(), scope, new ParserConfiguration(this, lineNumber, extraPositionInformation, false, true, config)); }
@SuppressWarnings("unchecked") public Node parse(String file, byte[] content, DynamicScope blockScope, ParserConfiguration configuration) { RubyArray list = getLines(configuration, runtime, file); LexerSource lexerSource = LexerSource.getSource(file, content, list, configuration); return parse(file, lexerSource, blockScope, configuration); }
@Deprecated public Node parse(String content, String file, DynamicScope scope, int lineNumber, boolean extraPositionInformation) { return parser.parse(file, content.getBytes(), scope, new ParserConfiguration(this, lineNumber, extraPositionInformation, false, true, config)); }
public double getTotalParseTime() { Ruby runtime = ruby.get(); if (runtime == null) return 0; return runtime.getParser().getTotalTime() / 1000000000.0; }
public long getTotalParsedBytes() { Ruby runtime = ruby.get(); if (runtime == null) return 0; return runtime.getParser().getTotalBytes(); }
@SuppressWarnings("unchecked") public Node parse(String file, InputStream content, DynamicScope blockScope, ParserConfiguration configuration) { RubyArray list = getLines(configuration, runtime, file); if (content instanceof LoadServiceResourceInputStream) { return parse(file, ((LoadServiceResourceInputStream) content).getBytes(), blockScope, configuration); } else { LexerSource lexerSource = LexerSource.getSource(file, content, list, configuration); return parse(file, lexerSource, blockScope, configuration); } }
@Deprecated public Node parse(String content, String file, DynamicScope scope, int lineNumber, boolean extraPositionInformation) { return parser.parse(file, content.getBytes(), scope, new ParserConfiguration(this, lineNumber, extraPositionInformation, false, true, config)); }
public double getTotalParseTime() { Ruby runtime = ruby.get(); if (runtime == null) return 0; return runtime.getParser().getTotalTime() / 1000000000.0; }
public long getTotalParsedBytes() { Ruby runtime = ruby.get(); if (runtime == null) return 0; return runtime.getParser().getTotalBytes(); }
@SuppressWarnings("unchecked") public Node parse(String file, InputStream content, DynamicScope blockScope, ParserConfiguration configuration) { RubyArray list = getLines(configuration, runtime, file); if (content instanceof LoadServiceResourceInputStream) { return parse(file, ((LoadServiceResourceInputStream) content).getBytes(), blockScope, configuration); } else { LexerSource lexerSource = LexerSource.getSource(file, content, list, configuration); return parse(file, lexerSource, blockScope, configuration); } }
public Node parseEval(String content, String file, DynamicScope scope, int lineNumber) { if (parserStats != null) parserStats.addEvalParse(); return parser.parse(file, content.getBytes(), scope, new ParserConfiguration(this, lineNumber, false, false, false, false, config)); }
public double getTotalParseTime() { Ruby runtime = ruby.get(); if (runtime == null) return 0; return runtime.getParser().getTotalTime() / 1000000000.0; }
public long getTotalParsedBytes() { Ruby runtime = ruby.get(); if (runtime == null) return 0; return runtime.getParser().getTotalBytes(); }
@SuppressWarnings("unchecked") public Node parse(String file, byte[] content, DynamicScope blockScope, ParserConfiguration configuration) { RubyArray list = getLines(configuration, runtime, file); ByteList in = new ByteList(content, configuration.getDefaultEncoding()); LexerSource lexerSource = new ByteListLexerSource(file, configuration.getLineNumber(), in, list); return parse(file, lexerSource, blockScope, configuration); }
public Node parseEval(String content, String file, DynamicScope scope, int lineNumber) { if (parserStats != null) parserStats.addEvalParse(); return parser.parse(file, content.getBytes(), scope, new ParserConfiguration(this, lineNumber, false, false, false, false, config)); }
@SuppressWarnings("unchecked") public Node parse(String file, ByteList content, DynamicScope blockScope, ParserConfiguration configuration) { configuration.setDefaultEncoding(content.getEncoding()); RubyArray list = getLines(configuration, runtime, file); LexerSource lexerSource = new ByteListLexerSource(file, configuration.getLineNumber(), content, list); return parse(file, lexerSource, blockScope, configuration); }