/// <summary> /// Provides the instance of Singleton SyntaxMap. /// </summary> /// <returns>Instance of Singleton SyntaxMap.</returns> public static SyntaxMap GetSyntaxMap() { if (_instance == null) { lock (syncLock) { if (_instance == null) { _instance = new SyntaxMap(); } } } return(_instance); }
/// <summary> /// Constructor that initializes mappings of available commands and their types, /// along with the passed reference of diagnostics and array of command. /// </summary> /// <param name="tokens"></param> /// <param name="diagnostics"></param> public Validator(string[] tokens, ArrayList diagnostics) { _tokens = tokens; _syntaxMap = SyntaxMap.GetSyntaxMap(); _diagnostics = diagnostics; }