private void checkFirstModule ( List < JSModule > modules ) { if ( modules . isEmpty ( ) ) { report ( JSError . make ( EMPTY_MODULE_LIST_ERROR ) ) ; } else if ( modules . get ( 0 ) . getInputs ( ) . isEmpty ( ) && modules . size ( ) > 1 ) { // The root module may only be empty if there is exactly 1 module. report ( JSError . make ( EMPTY_ROOT_MODULE_ERROR , modules . get ( 0 ) . getName ( ) ) ) ; } }
Verifies that at least one module has been provided and that the first one has at least one source code input .