Example #1
0
 public static Value GetValueType(Interpreter interpreter, SourceRef location, Value[] args, int argCount)
 {
     return(Value.Create(args[0].ActualType));
 }
Example #2
0
 public CompileException(string message, SourceRef location) : base(message)
 {
     Location = location;
 }
Example #3
0
 public MissingCommaException(SourceRef location) :
     base("Missing comma", location)
 {
 }
Example #4
0
 //Token.TokenType Type;
 public UnrecognizedTokenTypeException(Token.TokenType type, SourceRef location) :
     base("Unrecognized token \"" + type + "\"", location)
 {
     //Type = type;
 }
Example #5
0
 public UnmatchedTokenException(Token.TokenType type, SourceRef location) :
     base("Unmatched token \"" + type + "\"", location)
 {
 }
Example #6
0
 public ExpectedNodeException(ASTNode.NodeType expected, ASTNode.NodeType got, SourceRef location) :
     base("Expected \"" + expected + "\" but got \"" + got + "\"", location)
 {
 }
Example #7
0
 //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)
 {
 }
Example #13
0
 public static Value Create(Interpreter interpreter, SourceRef location, Value[] args, int argCount)
 {
     return(interpreter.Context.CreateCoroutine(args[0].VerifyType(Value.ValueType.Function, location)));
 }
Example #14
0
 public static Value ThrowException(Interpreter interpreter, SourceRef location, Value[] args, int argCount)
 {
     throw new InterpreterException(args[0].VerifyType(Value.ValueType.String, location).String, location);
 }
Example #15
0
 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)
 {
 }
Example #17
0
 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)
 {
 }
Example #19
0
 public InvalidConditionException(string statement, SourceRef location) :
     base("Invalid condition(s) for \"" + statement + "\" statement", location)
 {
 }
 public ExpectedCharacterException(
     SourceRef location
     ) : base("Expected a single character", location)
 {
 }
Example #21
0
 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)
 {
 }
Example #23
0
 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)
 {
 }
Example #25
0
 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)
 {
 }
Example #27
0
 public MissingSemicolonException(SourceRef location) :
     base("Missing semicolon", location)
 {
 }
 public InterpreterException(string message, SourceRef location) : base(message)
 {
     Location = location;
 }
Example #29
0
 public InvalidOperandsException(ASTNode.NodeType type, SourceRef location) :
     base("Invalid operand(s) for operator type \"" + type + "\"", location)
 {
 }
Example #30
0
 public static Value ConvToString(Interpreter interpreter, SourceRef location, Value[] args, int argCount)
 {
     return(args[0].ToString(interpreter.Context));
 }