KTextTemplate

token.h
1/*
2 This file is part of the KTextTemplate library
3
4 SPDX-FileCopyrightText: 2009, 2010 Stephen Kelly <steveire@gmail.com>
5
6 SPDX-License-Identifier: LGPL-2.1-or-later
7
8*/
9
10#ifndef KTEXTTEMPLATE_TOKEN_H
11#define KTEXTTEMPLATE_TOKEN_H
12
13#include <QString>
14
15namespace KTextTemplate
16{
17
18/**
19 @internal
20
21 The available token types.
22*/
24 TextToken, ///< The Token is a text fragment
25 VariableToken, ///< The Token is a variable node
26 BlockToken, ///< The Token is a block, ie, part of a tag
27 CommentToken ///< The Token is a comment node.
28};
29
30/// @headerfile token.h <KTextTemplate/Token>
31
32/**
33 A token in a parse stream for a template.
34
35 This class is only relevant for template tag implementations.
36*/
37struct Token {
38 int tokenType; ///< The Type of this Token
39 int linenumber; ///< The line number this Token starts at
40 QString content; ///< The content of this Token
41};
42}
43
44Q_DECLARE_TYPEINFO(KTextTemplate::Token, Q_RELOCATABLE_TYPE);
45
46#endif
The KTextTemplate namespace holds all public KTextTemplate API.
Definition Mainpage.dox:8
@ TextToken
The Token is a text fragment.
Definition token.h:24
@ CommentToken
The Token is a comment node.
Definition token.h:27
@ VariableToken
The Token is a variable node.
Definition token.h:25
@ BlockToken
The Token is a block, ie, part of a tag.
Definition token.h:26
A token in a parse stream for a template.
Definition token.h:37
int tokenType
The Type of this Token.
Definition token.h:38
QString content
The content of this Token.
Definition token.h:40
int linenumber
The line number this Token starts at.
Definition token.h:39
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:42 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.