当前位置: 首页>>代码示例>>C#>>正文


C# SyntaxTree.SourceContext类代码示例

本文整理汇总了C#中PascalABCCompiler.SyntaxTree.SourceContext的典型用法代码示例。如果您正苦于以下问题:C# SourceContext类的具体用法?C# SourceContext怎么用?C# SourceContext使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SourceContext类属于PascalABCCompiler.SyntaxTree命名空间,在下文中一共展示了SourceContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetTokenSourceContext

 public override SourceContext GetTokenSourceContext(Parser parser)
 {
     int LineNum = parser.TokenLineNumber + LineCorrection;
     SourceContext sc = new SourceContext(LineNum, parser.TokenLinePosition, LineNum + GetLinesCount(parser.TokenText), parser.TokenLinePosition + parser.TokenLength - 1, parser.TokenCharPosition, parser.TokenCharPosition + parser.TokenLength);
     if (scm != null)
         sc = scm.GetSourceContext(sc);
     return sc;
 }
开发者ID:CSRedRat,项目名称:pascalabcnet,代码行数:8,代码来源:PascalABCParserTools.cs

示例2: Find

        public syntax_tree_node Find(SyntaxTree.compilation_unit unit, SourceContext findContext)
        {
            _findContext = findContext;
            _findResult = null;
            //unit.visit(this);
            ProcessNode(unit);

            return _findResult;
        }
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:9,代码来源:CompilerDirectivesToSyntaxTreeNodesLinker.cs

示例3: In

 public bool In(SourceContext sc)
 {
     //return Position >= sc.Position && (Length + Position <= sc.Length + sc.Position);
     return
         !((begin_position.line_num < sc.begin_position.line_num) ||
         (end_position.line_num > sc.end_position.line_num) ||
         (begin_position.line_num == sc.begin_position.line_num && begin_position.column_num < sc.begin_position.column_num) ||
         (end_position.line_num == sc.end_position.line_num && end_position.column_num > sc.end_position.column_num));
 }
开发者ID:CSRedRat,项目名称:pascalabcnet,代码行数:9,代码来源:TreeSubsidiary.cs

示例4: Merge

 public SourceContext Merge(SourceContext right)
 {
     return new SourceContext(this, right);
 }
开发者ID:CSRedRat,项目名称:pascalabcnet,代码行数:4,代码来源:TreeSubsidiary.cs

示例5: SCToLexLoc

 public LexLocation SCToLexLoc(SourceContext sc) // переопределить неявное преобразование типов?
 {
     return new LexLocation(sc.begin_position.line_num, sc.begin_position.column_num - 1, sc.end_position.line_num, sc.end_position.column_num, sc.FileName);
 }
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:4,代码来源:SemanticRules.cs

示例6: BuildShortFuncDefinition

 public static procedure_definition BuildShortFuncDefinition(formal_parameters fp, procedure_attributes_list att, method_name name, type_definition result, expression ex, SourceContext headsc)
 {
     var ff = new function_header(fp, att, name, null, result, headsc);
     procedure_definition pd = BuildShortProcFuncDefinition(ff, new assign("Result", ex, ex.source_context));
     return pd;
 }
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:6,代码来源:NodesBuilder.cs

示例7: property_accessors

		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public property_accessors(read_accessor_name _read_accessor,write_accessor_name _write_accessor,SourceContext sc)
		{
			this._read_accessor=_read_accessor;
			this._write_accessor=_write_accessor;
			source_context = sc;
		}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:9,代码来源:Tree.cs

示例8: array_const

		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public array_const(expression_list _elements,SourceContext sc)
		{
			this._elements=_elements;
			source_context = sc;
		}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:8,代码来源:Tree.cs

示例9: case_node

		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public case_node(expression _param,case_variants _conditions,statement _else_statement,SourceContext sc)
		{
			this._param=_param;
			this._conditions=_conditions;
			this._else_statement=_else_statement;
			source_context = sc;
		}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:10,代码来源:Tree.cs

示例10: case_variant

		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public case_variant(expression_list _conditions,statement _exec_if_true,SourceContext sc)
		{
			this._conditions=_conditions;
			this._exec_if_true=_exec_if_true;
			source_context = sc;
		}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:9,代码来源:Tree.cs

示例11: get_address

		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public get_address(addressed_value _address_of,SourceContext sc)
		{
			this._address_of=_address_of;
			source_context = sc;
		}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:8,代码来源:Tree.cs

示例12: hex_constant

		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public hex_constant(Int64 _val,SourceContext sc)
		{
			this._val=_val;
			source_context = sc;
		}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:8,代码来源:Tree.cs

示例13: program_module

		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public program_module(string _file_name,List<compiler_directive> _compiler_directives,LanguageId _Language,program_name _program_name,uses_list _used_units,block _program_block,using_list _using_namespaces,SourceContext sc)
		{
			this._file_name=_file_name;
			this._compiler_directives=_compiler_directives;
			this._Language=_Language;
			this._program_name=_program_name;
			this._used_units=_used_units;
			this._program_block=_program_block;
			this._using_namespaces=_using_namespaces;
			source_context = sc;
		}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:14,代码来源:Tree.cs

示例14: unit_module

		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public unit_module(string _file_name,List<compiler_directive> _compiler_directives,LanguageId _Language,unit_name _unit_name,interface_node _interface_part,implementation_node _implementation_part,statement_list _initialization_part,statement_list _finalization_part,attribute_list _attributes,SourceContext sc)
		{
			this._file_name=_file_name;
			this._compiler_directives=_compiler_directives;
			this._Language=_Language;
			this._unit_name=_unit_name;
			this._interface_part=_interface_part;
			this._implementation_part=_implementation_part;
			this._initialization_part=_initialization_part;
			this._finalization_part=_finalization_part;
			this._attributes=_attributes;
			source_context = sc;
		}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:16,代码来源:Tree.cs

示例15: method_call

		///<summary>
		///Конструктор с параметрами.
		///</summary>
		public method_call(addressed_value _dereferencing_value,expression_list _parameters,SourceContext sc)
		{
			this._dereferencing_value=_dereferencing_value;
			this._parameters=_parameters;
			source_context = sc;
		}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:9,代码来源:Tree.cs


注:本文中的PascalABCCompiler.SyntaxTree.SourceContext类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。