A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://clang.llvm.org/doxygen/classclang_1_1syntax_1_1List.html below:

clang: clang::syntax::List Class Reference

A list of Elements separated or terminated by a fixed token. More...

#include "clang/Tooling/Syntax/Tree.h"

  Node (NodeKind Kind)   Newly created nodes are detached from a tree, parent and sibling links are set when the node is added as a child to another one.
    Node (const Node &)=delete   Nodes cannot simply be copied without violating tree invariants.
    Node (Node &&)=delete   Idiomatically, nodes are allocated on an Arena and never moved.
    Node (NodeKind Kind)   Newly created nodes are detached from a tree, parent and sibling links are set when the node is added as a child to another one.
    ~Node ()=default   Nodes are allocated on Arenas; the destructor is never called.
 

A list of Elements separated or terminated by a fixed token.

This type models the following grammar construct: delimited-list(element, delimiter, termination, canBeEmpty)

Definition at line 254 of file Tree.h.

◆ TerminationKind Enumerator Terminated  MaybeTerminated  Separated 

Definition at line 261 of file Tree.h.

◆ canBeEmpty() bool syntax::List::canBeEmpty ( ) const

Whether this list can be empty in syntactically and semantically correct code.

This list may be empty when the source code has errors even if canBeEmpty() returns false.

Definition at line 427 of file Tree.cpp.

References getKind().

◆ classof() static bool clang::syntax::List::classof ( const NodeN ) static ◆ getDelimiterTokenKind()

Returns the appropriate delimiter for this list.

Useful for discovering the correct delimiter to use when adding elements to empty or one-element lists.

Definition at line 399 of file Tree.cpp.

References getKind().

◆ getElementsAsNodes() std::vector< syntax::Node * > syntax::List::getElementsAsNodes ( ) ◆ getElementsAsNodesAndDelimiters()

Returns the elements and corresponding delimiters.

Missing elements and delimiters are represented as null pointers.

For example, in a separated list: "a, b, c" <=> [("a" , ","), ("b" , "," ), ("c" , null)] "a, , c" <=> [("a" , ","), (null, "," ), ("c" , null)] "a, b c" <=> [("a" , ","), ("b" , null), ("c" , null)] "a, b," <=> [("a" , ","), ("b" , "," ), (null, null)]

In a terminated or maybe-terminated list: "a; b; c;" <=> [("a" , ";"), ("b" , ";" ), ("c" , ";" )] "a; ; c;" <=> [("a" , ";"), (null, ";" ), ("c" , ";" )] "a; b c;" <=> [("a" , ";"), ("b" , null), ("c" , ";" )] "a; b; c" <=> [("a" , ";"), ("b" , ";" ), ("c" , null)]

Definition at line 312 of file Tree.cpp.

References clang::C, clang::syntax::ListDelimiter, clang::syntax::ListElement, MaybeTerminated, Separated, and Terminated.

◆ getTerminationKind()

The documentation for this class was generated from the following files:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4