mirror of
https://github.com/Cekis/SWG-ScriptConverter.git
synced 2026-01-16 22:04:29 -05:00
16 lines
469 B
C#
16 lines
469 B
C#
using ScriptConverter.Ast.Expressions;
|
|
|
|
namespace ScriptConverter.Parser.Parselets.Expressions
|
|
{
|
|
class InstanceOfParselet : IInfixParselet
|
|
{
|
|
public int Precedence { get { return (int)PrecedenceValue.Relational; } }
|
|
|
|
public Expression Parse(ScriptParser parser, Expression left, ScriptToken token)
|
|
{
|
|
var type = parser.ParseType();
|
|
return new InstanceOfExpression(parser.Previous, left, type);
|
|
}
|
|
}
|
|
}
|