private boolean verifyProvide ( Node methodName , Node arg ) { if ( ! verifyLastArgumentIsString ( methodName , arg ) ) { return false ; } if ( ! NodeUtil . isValidQualifiedName ( compiler . getOptions ( ) . getLanguageIn ( ) . toFeatureSet ( ) , arg . getString ( ) ) ) { compiler . report ( JSError . make ( arg , INVALID_PROVIDE_ERROR , arg . getString ( ) , compiler . getOptions ( ) . getLanguageIn ( ) . toString ( ) ) ) ; return false ; } return true ; }
Verifies that a provide method call has exactly one argument and that it s a string literal and that the contents of the string are valid JS tokens . Reports a compile error if it doesn t .