diff options
author | Ting-Wei Lan <lantw44@gmail.com> | 2015-12-02 00:18:08 +0800 |
---|---|---|
committer | Ting-Wei Lan <lantw44@gmail.com> | 2015-12-02 00:18:08 +0800 |
commit | f2a04b9f3810d1c19f8359bf3f1dbbe38bf07097 (patch) | |
tree | 240f3b2b7dc52ba28da0829c977d4643282157b2 /src/ast.c | |
parent | 15d78a2151c63a45adfad9dc954f79eba9207dab (diff) | |
download | compiler2015-f2a04b9f3810d1c19f8359bf3f1dbbe38bf07097.tar compiler2015-f2a04b9f3810d1c19f8359bf3f1dbbe38bf07097.tar.gz compiler2015-f2a04b9f3810d1c19f8359bf3f1dbbe38bf07097.tar.bz2 compiler2015-f2a04b9f3810d1c19f8359bf3f1dbbe38bf07097.tar.lz compiler2015-f2a04b9f3810d1c19f8359bf3f1dbbe38bf07097.tar.xz compiler2015-f2a04b9f3810d1c19f8359bf3f1dbbe38bf07097.tar.zst compiler2015-f2a04b9f3810d1c19f8359bf3f1dbbe38bf07097.zip |
Drop line_number and prog global variables
All important states should be stored in the local struct allocated in
main function.
Diffstat (limited to 'src/ast.c')
-rw-r--r-- | src/ast.c | 3 |
1 files changed, 0 insertions, 3 deletions
@@ -9,8 +9,6 @@ #include <stdlib.h> -extern int line_number; - AST_NODE *Allocate(AST_TYPE type) { AST_NODE *temp; @@ -22,7 +20,6 @@ AST_NODE *Allocate(AST_TYPE type) temp->parent = NULL; // Notice that leftmostSibling is not initialized as NULL temp->leftmostSibling = temp; - temp->linenumber = line_number; return temp; } |