public static boolean isVariableNamePartValid ( String namePart , Scope scope ) { if ( DIGITS_PATTERN . matcher ( namePart ) . matches ( ) ) { return true ; } if ( REUSABLE_KEYWORDS . contains ( namePart ) ) { return scope . followUp ( namePart , true ) ; } return isVariableNameValid ( namePart ) ; }
Either namePart is a string of digits or it must be a valid name itself