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
Показать файл Открыть проект Примеры использования класса

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