ScriptContext
Date: 2019-10-22

org.jmol.script

## Class ScriptContext

- java.lang.Object
- - org.jmol.script.ScriptContext

-     public class ScriptContext
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private T[][]` | `aatoken`
    `(package private) boolean` | `allowJSThreads`
    `(package private) boolean` | `chk`
    `private static int` | `contextCount`
    `java.lang.String` | `contextPath`
    `(package private) boolean` | `displayLoadErrorsSave`
    `java.lang.String` | `errorMessage`
    `(package private) java.lang.String` | `errorMessageUntranslated`
    `java.lang.String` | `errorType`
    `boolean` | `executionPaused`
    `boolean` | `executionStepping`
    `(package private) SV[]` | `forVars`
    `java.lang.String` | `functionName`
    `(package private) java.util.Map<java.lang.String,java.lang.String>` | `htFileCache`
    `int` | `iCommandError`
    `int` | `id`
    `boolean` | `isComplete`
    `(package private) boolean` | `isFunction`
    `boolean` | `isJSThread`
    `(package private) boolean` | `isStateScript`
    `(package private) boolean` | `isTryCatch`
    `(package private) int` | `iToken`
    `(package private) int` | `lineEnd`
    `int[][]` | `lineIndices`
    `(package private) short[]` | `lineNumbers`
    `boolean` | `mustResumeEval`
    `javajs.util.SB` | `outputBuffer`
    `(package private) JmolParallelProcessor` | `parallelProcessor`
    `ScriptContext` | `parentContext`
    `int` | `pc`
    `int` | `pc0`
    `int` | `pcEnd`
    `private int[]` | `pointers`
    `java.lang.String` | `script`
    `(package private) java.lang.String` | `scriptExtensions`
    `java.lang.String` | `scriptFileName`
    `(package private) int` | `scriptLevel`
    `T[]` | `statement`
    `(package private) int` | `statementLength`
    `(package private) int` | `theTok`
    `(package private) T` | `theToken`
    `(package private) ContextToken` | `token`
    `(package private) int` | `tryPt`
    `java.util.Map<java.lang.String,SV>` | `vars`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ScriptContext()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Map<java.lang.String,SV>` | `getFullMap()`
    `T[]` | `getToken(int i)`
    `int` | `getTokenCount()`
    `SV` | `getVariable(java.lang.String var)` Context variables go up the stack until a function is found.
    `(package private) T[][]` | `restoreTokens()`
    `(package private) void` | `saveTokens(T[][] aa)` save pointers indicating state of if/then
    `void` | `setMustResume()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### contextCount

          private static int contextCount

    - #### aatoken

          private T[][] aatoken

    - #### allowJSThreads

          boolean allowJSThreads

    - #### chk

          boolean chk

    - #### contextPath

          public java.lang.String contextPath

    - #### vars

          public java.util.Map<java.lang.String,SV> vars

    - #### displayLoadErrorsSave

          boolean displayLoadErrorsSave

    - #### errorMessage

          public java.lang.String errorMessage

    - #### errorMessageUntranslated

          java.lang.String errorMessageUntranslated

    - #### errorType

          public java.lang.String errorType

    - #### executionPaused

          public boolean executionPaused

    - #### executionStepping

          public boolean executionStepping

    - #### functionName

          public java.lang.String functionName

    - #### iCommandError

          public int iCommandError

    - #### id

          public int id

    - #### isComplete

          public boolean isComplete

    - #### isFunction

          boolean isFunction

    - #### isJSThread

          public boolean isJSThread

    - #### isStateScript

          boolean isStateScript

    - #### isTryCatch

          boolean isTryCatch

    - #### forVars

          SV[] forVars

    - #### iToken

          int iToken

    - #### lineEnd

          int lineEnd

    - #### lineIndices

          public int[][] lineIndices

    - #### lineNumbers

          short[] lineNumbers

    - #### mustResumeEval

          public boolean mustResumeEval

    - #### outputBuffer

          public javajs.util.SB outputBuffer

    - #### parallelProcessor

          JmolParallelProcessor parallelProcessor

    - #### parentContext

          public ScriptContext parentContext

    - #### pc

          public int pc

    - #### pc0

          public int pc0

    - #### pcEnd

          public int pcEnd

    - #### script

          public java.lang.String script

    - #### scriptExtensions

          java.lang.String scriptExtensions

    - #### scriptFileName

          public java.lang.String scriptFileName

    - #### scriptLevel

          int scriptLevel

    - #### statement

          public T[] statement

    - #### htFileCache

          java.util.Map<java.lang.String,java.lang.String> htFileCache

    - #### statementLength

          int statementLength

    - #### token

          ContextToken token

    - #### tryPt

          int tryPt

    - #### theToken

          T theToken

    - #### theTok

          int theTok

    - #### pointers

          private int[] pointers

  - ### Constructor Detail

    - #### ScriptContext

          ScriptContext()

  - ### Method Detail

    - #### setMustResume

          public void setMustResume()

    - #### getVariable

          public SV getVariable(java.lang.String var)

      Context variables go up the stack until a function is found. That is considered to be the highest level.
      Parameters:
        `var` -
      Returns:
        context variables

    - #### getFullMap

          public java.util.Map<java.lang.String,SV> getFullMap()

    - #### saveTokens

          void saveTokens(T[][] aa)

      save pointers indicating state of if/then
      Parameters:
        `aa` - the command array token list

    - #### restoreTokens

          T[][] restoreTokens()

    - #### getTokenCount

          public int getTokenCount()

    - #### getToken

          public T[] getToken(int i)