/** * Parse and execute. Parsing begins right after the "new" keyword and the operation name token. * * @param sp is the script parser to use to help in the parsing. * @param currentStream is the current token stream. * @return the variable reference that got created. Should never be null. */ @Override public VariableReference parseAndCreate(ScriptParser sp, TokenStream currentStream) throws ScriptException { VariableReference connectionName = sp.evaluateExpression(currentStream); if (connectionName == null) sp.syntaxError(currentStream, "Need connection name expression"); String connectionNameString = sp.resolveMustExist(currentStream, connectionName).getStringValue(); return new VariableConnectionName(connectionNameString); }