summaryrefslogtreecommitdiff
path: root/src/core/common/Token.hpp
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-03-02 15:52:13 +0100
committerBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-03-02 15:52:13 +0100
commit5d6ee07995c7f59e66e0df558c8ebe7d2a8d1f68 (patch)
tree4e52145bb12ba25082a4c149efaa7f8c24d51728 /src/core/common/Token.hpp
parent88afbcc2a4c4cb9956e4459cf1c5aa08e349835e (diff)
refactored SyntaxDescriptor to Token.hpp and added TokenDescriptor class.
Diffstat (limited to 'src/core/common/Token.hpp')
-rw-r--r--src/core/common/Token.hpp67
1 files changed, 1 insertions, 66 deletions
diff --git a/src/core/common/Token.hpp b/src/core/common/Token.hpp
index f89a0ce..f37151f 100644
--- a/src/core/common/Token.hpp
+++ b/src/core/common/Token.hpp
@@ -173,71 +173,6 @@ struct Token {
const SourceLocation &getLocation() const { return location; }
};
-/**
- * Class describing the user defined syntax for a single field or annotation.
- */
-struct TokenSyntaxDescriptor {
- /**
- * Possible start token or Tokens::Empty if no token is set.
- */
- TokenId start;
-
- /**
- * Possible end token or Tokens::Empty if no token is set.
- */
- TokenId end;
-
- /**
- * Possible representation token or Tokens::Empty if no token is set.
- */
- TokenId shortForm;
-
- /**
- * Flag specifying whether this TokenSyntaxDescriptor describes an
- * annotation.
- */
- bool isAnnotation;
-
- /**
- * Default constructor, sets all token ids to Tokens::Empty and isAnnotation
- * to false.
- */
- TokenSyntaxDescriptor()
- : start(Tokens::Empty),
- end(Tokens::Empty),
- shortForm(Tokens::Empty),
- isAnnotation(false)
- {
- }
-
- /**
- * Member initializer constructor.
- *
- * @param start is a possible start token.
- * @param end is a possible end token.
- * @param shortForm is a possible short form token.
- * @param isAnnotation is set to true if this syntax descriptor describes an
- * annotation.
- */
- TokenSyntaxDescriptor(TokenId start, TokenId end, TokenId shortForm,
- bool isAnnotation)
- : start(start),
- end(end),
- shortForm(shortForm),
- isAnnotation(isAnnotation)
- {
- }
-
- /**
- * Inserts all tokens referenced in this TokenSyntaxDescriptor into the
- * given TokenSet. Skips token ids set to Tokens::Empty.
- *
- * @param set is the TokenSet instance into which the Tokens should be
- * inserted.
- */
- void insertIntoTokenSet(TokenSet &set) const;
-};
}
-#endif /* _OUSIA_TOKENS_HPP_ */
-
+#endif /* _OUSIA_TOKENS_HPP_ */ \ No newline at end of file