mirror of
https://github.com/aantron/better-enums.git
synced 2025-12-08 01:36:44 +08:00
222 lines
10 KiB
C++
222 lines
10 KiB
C++
#include <enum.h>
|
|
|
|
ENUM(Channel, int,
|
|
Red, Green, Blue, Cyan, Magenta, Yellow, Black, Hue, Saturation, Value)
|
|
|
|
ENUM(Direction, int,
|
|
North, East, South, West, NorthEast, SouthEast, SouthWest, NorthWest,
|
|
NorthNorthEast, EastNorthEast, EastSouthEast, SouthSouthEast,
|
|
SouthSouthWest, WestSouthWest, WestNorthWest, NorthNorthWest)
|
|
|
|
ENUM(ASTNode, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(State, int,
|
|
Attacking, Defending, Searching, Pursuing, Hungry, Fleeing, Confused,
|
|
Healing, Stunned)
|
|
|
|
ENUM(APIMethod, int,
|
|
ReadPost, WritePost, PollPost, ReadImage, WriteImage, PollImage, ReadKey,
|
|
WriteKey, PollKey, ReadUser, WriteUser, PollUser, ReadOrganization,
|
|
WriteOrganization, PollOrganization, ReadGroup, WriteGroup, PollGroup,
|
|
ReadProject, WriteProject, PollProject, ReadComment, WriteComment,
|
|
PollComment, ReadPermission, WritePermission, PollPermission, ReadOwner,
|
|
WriteOwner, PollOwner, ReadProposal, WriteProposal, PollProposal,
|
|
ReadHistory, WriteHistory, PollHistory)
|
|
|
|
ENUM(Lipsum, int,
|
|
Lorem, ipsum, dolor, sit, amet, consectetur, adipiscing, elit, Vivamus,
|
|
libero, massa, tincidunt, at, ex, nec, porta, malesuada, arcu, Nullam,
|
|
lectus, nibh, dictum, eget, convallis, ac, feugiat, felis, Suspendisse,
|
|
quis, purus, vel, lacus, cursus, tristique, Donec, augue, tortor, luctus,
|
|
a, sed, mattis, in, quam, Cras, vitae, euismod, Cum, sociis, natoque,
|
|
penatibus, et, magnis, dis, parturient)
|
|
|
|
ENUM(ASTNode0, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode1, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode2, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode3, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode4, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode5, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode6, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode7, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode8, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode9, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode10, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode11, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode12, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode13, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode14, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode15, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode16, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode17, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode18, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode19, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode20, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode21, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode22, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode23, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode24, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode25, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode26, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode27, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode28, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
ENUM(ASTNode29, int,
|
|
IntegerLiteral, StringLiteral, CharacterLiteral, Variable, UnaryOperation,
|
|
BinaryOperation, ApplicationExpression, Abstraction, LetBinding,
|
|
CaseExpression, Pattern, Signature, Module, Functor, TypeVariable,
|
|
BasicType, ArrowType, VariantTypeConstant)
|
|
|
|
int main()
|
|
{
|
|
return 0;
|
|
}
|