當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。