本文整理了Java中gw.lang.parser.Keyword.isReservedKeyword()
方法的一些代码示例,展示了Keyword.isReservedKeyword()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Keyword.isReservedKeyword()
方法的具体详情如下:
包路径:gw.lang.parser.Keyword
类名称:Keyword
方法名:isReservedKeyword
暂无
代码示例来源:origin: org.gosu-lang.gosu/gosu-lab
private boolean isReserved(String ident) {
return Keyword.isReservedKeyword( ident );
}
代码示例来源:origin: org.gosu-lang.gosu/gosu-editor
public boolean isReservedWord( String strWord )
{
return Keyword.isReservedKeyword( strWord );
}
代码示例来源:origin: org.gosu-lang.gosu/gosu-lab
public boolean isReservedWord( String strWord )
{
return Keyword.isReservedKeyword( strWord );
}
代码示例来源:origin: org.gosu-lang.gosu/gosu-core
private boolean canExtendMethod( IMethodInfo mi )
{
if( !(mi instanceof JavaMethodInfo) )
{
// It is possible that a methodinfo on a java type originates outside of java.
// E.g., enhancement methods. Gosu does not support extending these.
return false;
}
if( isPropertyMethod( mi ) )
{
// We favor properties over methods -- gotta pick one
return false;
}
//## todo: maybe support implementing/overriding Java methods having a keyword as a name by escaping the keyword (using @ maybe?) so the parser can throw it away and not stop on the token as a reserved keyword 77
if( Keyword.isReservedKeyword( mi.getDisplayName() ) )
{
return false;
}
int iMethodModifiers = ((IJavaMethodInfo)mi).getModifiers();
return //!java.lang.reflect.Modifier.isFinal( iMethodModifiers ) &&
!java.lang.reflect.Modifier.isNative( iMethodModifiers ) &&
// See GosuClassInstanceFactory.genSuperClassMembers() (we don't allow finalizers)
!mi.getDisplayName().equals( "finalize" ) &&
mi.getDisplayName().indexOf( '$' ) < 0;
}
代码示例来源:origin: gosu-lang/old-gosu-repo
warn( element, !Keyword.isReservedKeyword( strFunctionName ), Res.MSG_IMPROPER_USE_OF_KEYWORD, strFunctionName );
代码示例来源:origin: org.gosu-lang.gosu/gosu-core
warn( element, !Keyword.isReservedKeyword( strFunctionName ), Res.MSG_IMPROPER_USE_OF_KEYWORD, strFunctionName );
内容来源于网络,如有侵权,请联系作者删除!