]> git.sur5r.net Git - cc65/commitdiff
Added the near keyword
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 1 Aug 2003 21:38:54 +0000 (21:38 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 1 Aug 2003 21:38:54 +0000 (21:38 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@2237 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/cc65/scanner.c
src/cc65/scanner.h

index 941fb75192a1947019ac07199255cc024ee45f59..05ececed3e2be877f9dbc81c68dd22729ccd0eba 100644 (file)
@@ -82,14 +82,15 @@ static const struct Keyword {
 } Keywords [] = {
     { "_Pragma",        TOK_PRAGMA,     TT_C    },
     { "__A__",         TOK_A,          TT_C    },
-    { "__AX__",                TOK_AX,         TT_C    },
-    { "__EAX__",               TOK_EAX,        TT_C    },
-    { "__X__",                 TOK_X,          TT_C    },
-    { "__Y__",                 TOK_Y,          TT_C    },
-    { "__asm__",               TOK_ASM,        TT_C    },
-    { "__attribute__", TOK_ATTRIBUTE,  TT_C    },
-    { "__far__",       TOK_FAR,        TT_C    },
-    { "__fastcall__",          TOK_FASTCALL,   TT_C    },
+    { "__AX__",                TOK_AX,         TT_C    },
+    { "__EAX__",               TOK_EAX,        TT_C    },
+    { "__X__",                 TOK_X,          TT_C    },
+    { "__Y__",                 TOK_Y,          TT_C    },
+    { "__asm__",               TOK_ASM,        TT_C    },
+    { "__attribute__", TOK_ATTRIBUTE,  TT_C    },
+    { "__far__",       TOK_FAR,        TT_C    },
+    { "__fastcall__",          TOK_FASTCALL,   TT_C    },
+    { "__near__",              TOK_NEAR,       TT_C    },
     { "asm",                   TOK_ASM,        TT_EXT  },
     { "auto",                  TOK_AUTO,       TT_C    },
     { "break",                 TOK_BREAK,      TT_C    },
@@ -111,6 +112,7 @@ static const struct Keyword {
     { "if",                    TOK_IF,         TT_C    },
     { "int",                   TOK_INT,        TT_C    },
     { "long",                  TOK_LONG,       TT_C    },
+    { "near",                  TOK_NEAR,       TT_EXT  },
     { "register",              TOK_REGISTER,   TT_C    },
     { "restrict",              TOK_RESTRICT,   TT_C    },
     { "return",                TOK_RETURN,     TT_C    },
@@ -126,7 +128,7 @@ static const struct Keyword {
     { "void",                  TOK_VOID,       TT_C    },
     { "volatile",              TOK_VOLATILE,   TT_C    },
     { "while",                 TOK_WHILE,      TT_C    },
-};
+};                              
 #define KEY_COUNT      (sizeof (Keywords) / sizeof (Keywords [0]))
 
 
index 59b00068fe57c75add067a313196b309f011b3a7..dabc17a373e6cc7b4beaf741e58c1bbad8b62230 100644 (file)
@@ -157,6 +157,7 @@ typedef enum token_t {
 
     TOK_ATTRIBUTE,
     TOK_FAR,
+    TOK_NEAR,
     TOK_FASTCALL,
     TOK_A,
     TOK_X,