about summary refs log tree commit diff
path: root/src/comp/syntax
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2011-12-16 16:55:22 +0100
committerMarijn Haverbeke <marijnh@gmail.com>2011-12-16 22:17:47 +0100
commitdd9693f211f65d4c69a2e65c3e33ccc337d7f695 (patch)
treed3f744255966cdc6e20d69633c159278161fe3bb /src/comp/syntax
parentdbfa1b56894c06dd1556cb00d16d8208447db3b8 (diff)
downloadrust-dd9693f211f65d4c69a2e65c3e33ccc337d7f695.tar.gz
rust-dd9693f211f65d4c69a2e65c3e33ccc337d7f695.zip
Reserve node_id 0 for the crate top-level module
And define a const to refer to it.
Diffstat (limited to 'src/comp/syntax')
-rw-r--r--src/comp/syntax/ast.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/comp/syntax/ast.rs b/src/comp/syntax/ast.rs
index d85849b2571..b7af23e9dd5 100644
--- a/src/comp/syntax/ast.rs
+++ b/src/comp/syntax/ast.rs
@@ -22,6 +22,7 @@ type node_id = int;
 type def_id = {crate: crate_num, node: node_id};
 
 const local_crate: crate_num = 0;
+const crate_node_id: node_id = 0;
 
 type ty_param = {ident: ident, kind: kind};