public ThisAction(ParseInfo parseInfo, Scope scope, DeltinScriptParser.E_thisContext context)
 {
     ThisType = scope.GetThis();
     if (ThisType == null)
     {
         parseInfo.Script.Diagnostics.Error("Keyword 'this' cannot be used here.", DocRange.GetRange(context));
     }
 }
 public ThisAction(ParseInfo parseInfo, Scope scope, ThisExpression context)
 {
     ThisType = scope.GetThis();
     if (ThisType == null)
     {
         parseInfo.Script.Diagnostics.Error("Keyword 'this' cannot be used here.", context.Range);
     }
 }
        public BaseAction(ParseInfo parseInfo, Scope scope, DeltinScriptParser.E_baseContext context)
        {
            CodeType thisType = scope.GetThis();

            // Syntax error if the 'base' keyword is used outside of classes.
            if (thisType == null)
            {
                parseInfo.Script.Diagnostics.Error("Keyword 'base' cannot be used here.", DocRange.GetRange(context));
            }

            // Syntax error if the current class does not extend anything.
            else if (thisType.Extends == null)
            {
                parseInfo.Script.Diagnostics.Error("The current type does not extend a class.", DocRange.GetRange(context));
            }

            else
            {
                baseType = thisType.Extends;
            }
        }