private void configureScriptClassNode ( ) { ClassNode scriptClassNode = moduleNode . getScriptClassDummy ( ) ; if ( ! asBoolean ( scriptClassNode ) ) { return ; } List < Statement > statements = moduleNode . getStatementBlock ( ) . getStatements ( ) ; if ( ! statements . isEmpty ( ) ) { Statement firstStatement = statements . get ( 0 ) ; Statement lastStatement = statements . get ( statements . size ( ) - 1 ) ; scriptClassNode . setSourcePosition ( firstStatement ) ; scriptClassNode . setLastColumnNumber ( lastStatement . getLastColumnNumber ( ) ) ; scriptClassNode . setLastLineNumber ( lastStatement . getLastLineNumber ( ) ) ; } }
set the script source position