Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Jul 9, 2014
1 parent c1153cd commit 785a190
Showing 1 changed file with 30 additions and 32 deletions.
62 changes: 30 additions & 32 deletions src/include/token.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,36 +32,36 @@ extern "C" {
#endif

typedef enum fr_token_t {
T_OP_INVALID = 0, /* invalid token */
T_EOL, /* end of line */
T_LCBRACE, /* { */
T_RCBRACE, /* } */
T_LBRACE, /* ( */
T_RBRACE, /* ) 5 */
T_COMMA, /* , */
T_SEMICOLON, /* ; */
T_OP_INVALID = 0, /* invalid token */
T_EOL, /* end of line */
T_LCBRACE, /* { */
T_RCBRACE, /* } */
T_LBRACE, /* ( */
T_RBRACE, /* ) 5 */
T_COMMA, /* , */
T_SEMICOLON, /* ; */

T_OP_INCRM, /* ++ */
T_OP_ADD, /* += */
T_OP_SUB, /* -= 10 */
T_OP_SET, /* := */
T_OP_EQ, /* = */
T_OP_NE, /* != */
T_OP_GE, /* >= */
T_OP_GT, /* > 15 */
T_OP_LE, /* <= */
T_OP_LT, /* < */
T_OP_REG_EQ, /* =~ */
T_OP_REG_NE, /* !~ */
T_OP_CMP_TRUE, /* =* 20 */
T_OP_CMP_FALSE, /* !* */
T_OP_CMP_EQ, /* == */
T_HASH, /* # */
T_BARE_WORD, /* bare word */
T_DOUBLE_QUOTED_STRING, /* "foo" 25 */
T_SINGLE_QUOTED_STRING, /* 'foo' */
T_BACK_QUOTED_STRING, /* `foo` */
T_TOKEN_LAST
T_OP_INCRM, /* ++ */
T_OP_ADD, /* += */
T_OP_SUB, /* -= 10 */
T_OP_SET, /* := */
T_OP_EQ, /* = */
T_OP_NE, /* != */
T_OP_GE, /* >= */
T_OP_GT, /* > 15 */
T_OP_LE, /* <= */
T_OP_LT, /* < */
T_OP_REG_EQ, /* =~ */
T_OP_REG_NE, /* !~ */
T_OP_CMP_TRUE, /* =* 20 */
T_OP_CMP_FALSE, /* !* */
T_OP_CMP_EQ, /* == */
T_HASH, /* # */
T_BARE_WORD, /* bare word */
T_DOUBLE_QUOTED_STRING, /* "foo" 25 */
T_SINGLE_QUOTED_STRING, /* 'foo' */
T_BACK_QUOTED_STRING, /* `foo` */
T_TOKEN_LAST
} FR_TOKEN;

#define T_EQSTART T_OP_ADD
Expand All @@ -76,9 +76,7 @@ extern const FR_NAME_NUMBER fr_tokens[];

int fr_str2int(FR_NAME_NUMBER const *table, char const *name, int def);
int fr_substr2int(FR_NAME_NUMBER const *table, char const *name, int def, int len);
char const *fr_int2str(FR_NAME_NUMBER const *table, int number,
char const *def);

char const *fr_int2str(FR_NAME_NUMBER const *table, int number, char const *def);

int getword (char const **ptr, char *buf, int buflen, bool unescape);
FR_TOKEN gettoken(char const **ptr, char *buf, int buflen, bool unescape);
Expand Down

0 comments on commit 785a190

Please sign in to comment.