本文整理汇总了C#中LexicalInfo类的典型用法代码示例。如果您正苦于以下问题:C# LexicalInfo类的具体用法?C# LexicalInfo怎么用?C# LexicalInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LexicalInfo类属于命名空间,在下文中一共展示了LexicalInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IfStatement
public IfStatement(LexicalInfo token, Expression condition, Block trueBlock, Block falseBlock)
: base(token)
{
this.Condition = condition;
this.TrueBlock = trueBlock;
this.FalseBlock = falseBlock;
}
示例2: CompilerError
public CompilerError(string code, LexicalInfo lexicalInfo, string message, Exception cause) : base(message, cause)
{
if (null == lexicalInfo)
throw new ArgumentNullException("lexicalInfo");
_code = code;
_lexicalInfo = lexicalInfo;
}
示例3: MappedNode
protected MappedNode(CompileResults results, LexicalInfo lexicalInfo, int length)
: this(results, null,
results.LocationToPoint(lexicalInfo),
results.LocationToPoint(lexicalInfo.Line, lexicalInfo.Column + length))
{
LexicalInfo = lexicalInfo;
}
示例4: BinaryExpression
public BinaryExpression(LexicalInfo lexicalInfoProvider, BinaryOperatorType operator_, Expression left, Expression right)
: base(lexicalInfoProvider)
{
this.Operator = operator_;
this.Left = left;
this.Right = right;
}
示例5: Slice
public Slice(LexicalInfo lexicalInfo, Expression begin, Expression end, Expression step)
: base(lexicalInfo)
{
this.Begin = begin;
this.End = end;
this.Step = step;
}
示例6: CompilerMessage
public CompilerMessage(LexicalInfo lexicalInfo, string code, string message, TaskErrorCategory errorCategory)
{
LexicalInfo = lexicalInfo;
Code = code;
Message = message;
ErrorCategory = errorCategory;
}
示例7: CompilerWarning
public CompilerWarning(LexicalInfo lexicalInfo, string message, string code)
{
if (null == message) throw new ArgumentNullException("message");
if (null == code) throw new ArgumentNullException("code");
_lexicalInfo = lexicalInfo;
_message = message;
_code = code;
}
示例8: CreateMethodInvocationExpression
public static MethodInvocationExpression CreateMethodInvocationExpression(LexicalInfo li, Expression target, Expression arg)
{
MethodInvocationExpression mie = new MethodInvocationExpression(li);
mie.Target = (Expression)target.Clone();
mie.Arguments.Add((Expression)arg.Clone());
mie.IsSynthetic = true;
return mie;
}
示例9: OnParserError
void OnParserError(antlr.RecognitionException error)
{
var location = new LexicalInfo(error.getFilename(), error.getLine(), error.getColumn());
var nvae = error as antlr.NoViableAltException;
if (null != nvae)
ParserError(location, nvae);
else
GenericParserError(location, error);
}
示例10: CompilerWarning
public CompilerWarning(LexicalInfo lexicalInfo, string message)
{
if (null == message)
{
throw new ArgumentNullException("message");
}
_code = "BCW0000";
_lexicalInfo = lexicalInfo;
_message = Boo.Lang.ResourceManager.Format(_code, message);
}
示例11: CreateReference
public MemberReferenceExpression CreateReference(LexicalInfo li, Field field)
{
MemberReferenceExpression e = CreateReference(field);
e.LexicalInfo = li;
return e;
}
示例12: CreateMethodReference
public Expression CreateMethodReference(LexicalInfo lexicalInfo, IMethod method)
{
var e = CreateMethodReference(method);
e.LexicalInfo = lexicalInfo;
return e;
}
示例13: CreateMethodInvocation
public MethodInvocationExpression CreateMethodInvocation(LexicalInfo li, Expression target, IMethod entity)
{
MethodInvocationExpression expression = CreateMethodInvocation(target, entity);
expression.LexicalInfo = li;
return expression;
}
示例14: CreateMethodFromPrototype
public Method CreateMethodFromPrototype(LexicalInfo location, IMethod baseMethod, TypeMemberModifiers newModifiers, string newMethodName)
{
var method = new Method(location);
method.Name = newMethodName;
method.Modifiers = newModifiers;
method.IsSynthetic = true;
var optionalTypeMappings = DeclareGenericParametersFromPrototype(method, baseMethod);
var typeReferenceFactory = optionalTypeMappings != null
? new MappedTypeReferenceFactory(TypeReferenceFactory, optionalTypeMappings)
: TypeReferenceFactory;
_typeReferenceFactory.With(typeReferenceFactory, ()=>
{
DeclareParameters(method, baseMethod.GetParameters(), baseMethod.IsStatic ? 0 : 1);
method.ReturnType = CreateTypeReference(baseMethod.ReturnType);
});
EnsureEntityFor(method);
return method;
}
示例15: RaiseException
public RaiseStatement RaiseException(LexicalInfo lexicalInfo, IConstructor exceptionConstructor, params Expression[] args)
{
Debug.Assert(TypeSystemServices.IsValidException(exceptionConstructor.DeclaringType));
return new RaiseStatement(lexicalInfo, CreateConstructorInvocation(lexicalInfo, exceptionConstructor, args));
}