本文整理了Java中org.jruby.Ruby.parseFileFromMain
方法的一些代码示例,展示了Ruby.parseFileFromMain
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ruby.parseFileFromMain
方法的具体详情如下:
包路径:org.jruby.Ruby
类名称:Ruby
方法名:parseFileFromMain
暂无
代码示例来源:origin: org.jruby/jruby-complete
public ParseResult parseFromMain(String fileName, InputStream in) {
if (config.isInlineScript()) return (ParseResult) parseInline(in, fileName, getCurrentContext().getCurrentScope());
return parseFileFromMain(fileName, in, getCurrentContext().getCurrentScope());
}
代码示例来源:origin: org.jruby/jruby-core
public ParseResult parseFromMain(String fileName, InputStream in) {
if (config.isInlineScript()) return (ParseResult) parseInline(in, fileName, getCurrentContext().getCurrentScope());
return parseFileFromMain(fileName, in, getCurrentContext().getCurrentScope());
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
/**
* Parse the script contained in the given input stream, using the given
* filename as the name of the script, and return the root Node. This
* is used to verify that the script syntax is valid, for jruby -c. The
* current scope (generally the top-level scope) is used as the parent
* scope for parsing.
*
* @param inputStream The input stream from which to read the script
* @param filename The filename to use for parsing
* @returns The root node of the parsed script
*/
public Node parseFromMain(InputStream inputStream, String filename) {
if (config.isInlineScript()) {
return parseInline(inputStream, filename, getCurrentContext().getCurrentScope());
} else {
return parseFileFromMain(inputStream, filename, getCurrentContext().getCurrentScope());
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/**
* Parse the script contained in the given input stream, using the given
* filename as the name of the script, and return the root Node. This
* is used to verify that the script syntax is valid, for jruby -c. The
* current scope (generally the top-level scope) is used as the parent
* scope for parsing.
*
* @param inputStream The input stream from which to read the script
* @param filename The filename to use for parsing
* @returns The root node of the parsed script
*/
public Node parseFromMain(InputStream inputStream, String filename) {
if (config.isInlineScript()) {
return parseInline(inputStream, filename, getCurrentContext().getCurrentScope());
} else {
return parseFileFromMain(inputStream, filename, getCurrentContext().getCurrentScope());
}
}
代码示例来源:origin: org.jruby/jruby-complete
/**
* Parse the script contained in the given input stream, using the given
* filename as the name of the script, and return the root Node. This
* is used to verify that the script syntax is valid, for jruby -c. The
* current scope (generally the top-level scope) is used as the parent
* scope for parsing.
*
* @param inputStream The input stream from which to read the script
* @param filename The filename to use for parsing
* @returns The root node of the parsed script
*/
public Node parseFromMain(InputStream inputStream, String filename) {
if (config.isInlineScript()) {
return parseInline(inputStream, filename, getCurrentContext().getCurrentScope());
} else {
return parseFileFromMain(inputStream, filename, getCurrentContext().getCurrentScope());
}
}
代码示例来源:origin: org.jruby/jruby-core
/**
* Parse the script contained in the given input stream, using the given
* filename as the name of the script, and return the root Node. This
* is used to verify that the script syntax is valid, for jruby -c. The
* current scope (generally the top-level scope) is used as the parent
* scope for parsing.
*
* @param inputStream The input stream from which to read the script
* @param filename The filename to use for parsing
* @returns The root node of the parsed script
*/
public Node parseFromMain(InputStream inputStream, String filename) {
if (config.isInlineScript()) {
return parseInline(inputStream, filename, getCurrentContext().getCurrentScope());
} else {
return parseFileFromMain(inputStream, filename, getCurrentContext().getCurrentScope());
}
}
内容来源于网络,如有侵权,请联系作者删除!