public static Value GetValueType(Interpreter interpreter, SourceRef location, Value[] args, int argCount) { return(Value.Create(args[0].ActualType)); }
public CompileException(string message, SourceRef location) : base(message) { Location = location; }
public MissingCommaException(SourceRef location) : base("Missing comma", location) { }
//Token.TokenType Type; public UnrecognizedTokenTypeException(Token.TokenType type, SourceRef location) : base("Unrecognized token \"" + type + "\"", location) { //Type = type; }
public UnmatchedTokenException(Token.TokenType type, SourceRef location) : base("Unmatched token \"" + type + "\"", location) { }
public ExpectedNodeException(ASTNode.NodeType expected, ASTNode.NodeType got, SourceRef location) : base("Expected \"" + expected + "\" but got \"" + got + "\"", location) { }
//string TokenString; public UnexpectedTokenException(string tokenString, SourceRef location) : base("Unexpected token \"" + tokenString + "\"", location) { //TokenString = tokenString; }
public UnexpectedTypeException( Type type, SourceRef location ) : base("Unexpected .NET type \"" + type + "\"", location) { }
public UnexpectedLeftTypeException( Value.ValueType type, SourceRef location ) : base("Unexpected left operand type \"" + type + "\"", location) { }
public CannotSetIndexInTypeException( Value.ValueType type, SourceRef location ) : base("Cannot set a value for an index in type \"" + type + "\"", location) { }
public CannotGetIndexInTypeException( Type type, SourceRef location ) : base("Cannot get a value from an index in type \"" + type + "\"", location) { }
public CannotIndexTypeException( Type type, SourceRef location ) : base("Cannot index type \"" + type + "\"", location) { }
public static Value Create(Interpreter interpreter, SourceRef location, Value[] args, int argCount) { return(interpreter.Context.CreateCoroutine(args[0].VerifyType(Value.ValueType.Function, location))); }
public static Value ThrowException(Interpreter interpreter, SourceRef location, Value[] args, int argCount) { throw new InterpreterException(args[0].VerifyType(Value.ValueType.String, location).String, location); }
public NoInfoForNodeException(ASTNode.NodeType type, SourceRef location) : base("No information available for node \"" + type + "\"", location) { }
public CannotCallTypeException( Value.ValueType type, SourceRef location ) : base("Cannot call a value of type " + type, location) { }
public NoCodeGenerationForNodeException(ASTNode.NodeType type, SourceRef location) : base("No code generation available for node type \"" + type + "\"", location) { }
public UnexpectedRightTypeException( Type type, SourceRef location ) : base("Unexpected right operand .NET type \"" + type + "\"", location) { }
public InvalidConditionException(string statement, SourceRef location) : base("Invalid condition(s) for \"" + statement + "\" statement", location) { }
public ExpectedCharacterException( SourceRef location ) : base("Expected a single character", location) { }
public ExpectedTokenException(string tokenString, SourceRef location) : base("Expected token \"" + tokenString + "\"", location) { }
public CannotThreadTypeException( Value.ValueType type, SourceRef location ) : base("Cannot start a thread with a value of type " + type, location) { }
public StringNotTerminatedException(SourceRef location) : base("String not terminated", location) { }
public NotEnoughArgumentsException( int expected, int got, SourceRef location ) : base("Function expected " + expected + " arguments but got " + got, location) { }
public MalformedNumberException(SourceRef location) : base("Malformed number", location) { }
public NoCaseForInstructionException( Instruction.InstructionType type, SourceRef location ) : base("Interpreter does not have a case for instruction " + type, location) { }
public MissingSemicolonException(SourceRef location) : base("Missing semicolon", location) { }
public InterpreterException(string message, SourceRef location) : base(message) { Location = location; }
public InvalidOperandsException(ASTNode.NodeType type, SourceRef location) : base("Invalid operand(s) for operator type \"" + type + "\"", location) { }
public static Value ConvToString(Interpreter interpreter, SourceRef location, Value[] args, int argCount) { return(args[0].ToString(interpreter.Context)); }