A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
highlight.h File Reference
#include <string_view>
#include <vector>
#include <absl/types/span.h>
#include "a11/flow/token.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  a11::flow::SemanticToken
 One token, and what it means. More...
 

Namespaces

namespace  a11
 
namespace  a11::flow
 

Enumerations

enum class  a11::flow::SemanticKind {
  a11::flow::kComment , a11::flow::kString , a11::flow::kNumber , a11::flow::kDuration ,
  a11::flow::kDeclarationKeyword , a11::flow::kStatementKeyword , a11::flow::kModifierKeyword , a11::flow::kStage ,
  a11::flow::kBuiltin , a11::flow::kType , a11::flow::kStatusCode , a11::flow::kLogLevel ,
  a11::flow::kConstant , a11::flow::kWordOperator , a11::flow::kFlowName , a11::flow::kActionName ,
  a11::flow::kNodeMapName , a11::flow::kMember , a11::flow::kPortName , a11::flow::kIdentifier ,
  a11::flow::kFlowOperator , a11::flow::kOperator , a11::flow::kBrace , a11::flow::kParenthesis ,
  a11::flow::kBracket , a11::flow::kPunctuation , a11::flow::kBad
}
 What a token means where it stands, which is what a reader colours by. More...
 

Functions

std::string_view a11::flow::SemanticKindName (SemanticKind kind)
 The name of a semantic kind in the output formats, in kebab case.
 
SemanticKind a11::flow::SemanticKindFromName (std::string_view name)
 The kind a name refers to, or kIdentifier if it is not one.
 
std::vector< SemanticToken > a11::flow::Highlight (absl::Span< const Token > tokens)
 Classify a token stream.
 
void a11::flow::RefinePorts (std::string_view source, std::vector< SemanticToken > &semantic)
 Mark the identifiers that are ports of the flow they stand in.