C# 클래스 Antlr4.Runtime.Tree.Pattern.TagChunk

Represents a placeholder tag in a tree pattern.
Represents a placeholder tag in a tree pattern. A tag can have any of the following forms.
  • expr : An unlabeled placeholder for a parser rule expr .
  • ID : An unlabeled placeholder for a token of type ID .
  • e:expr : A labeled placeholder for a parser rule expr .
  • id:ID : A labeled placeholder for a token of type ID .
This class does not perform any validation on the tag or label names aside from ensuring that the tag is a non-null, non-empty string.
상속: Chunk
파일 보기 프로젝트 열기: antlr/antlr4 1 사용 예제들

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
TagChunk ( string tag ) : System

Construct a new instance of TagChunk using the specified tag and no label.

TagChunk ( string label, string tag ) : System

Construct a new instance of TagChunk using the specified label and tag.

ToString ( ) : string

This method returns a text representation of the tag chunk.

This method returns a text representation of the tag chunk. Labeled tags are returned in the form label:tag , and unlabeled tags are returned as just the tag name.

메소드 상세

TagChunk() 공개 메소드

Construct a new instance of TagChunk using the specified tag and no label.
/// IllegalArgumentException /// if /// /// is /// /// or /// empty. ///
public TagChunk ( string tag ) : System
tag string /// The tag, which should be the name of a parser rule or token /// type. ///
리턴 System

TagChunk() 공개 메소드

Construct a new instance of TagChunk using the specified label and tag.
/// IllegalArgumentException /// if /// /// is /// /// or /// empty. ///
public TagChunk ( string label, string tag ) : System
label string /// The label for the tag. If this is /// /// , the /// /// represents an unlabeled tag. ///
tag string /// The tag, which should be the name of a parser rule or token /// type. ///
리턴 System

ToString() 공개 메소드

This method returns a text representation of the tag chunk.
This method returns a text representation of the tag chunk. Labeled tags are returned in the form label:tag , and unlabeled tags are returned as just the tag name.
public ToString ( ) : string
리턴 string