## symbol.api
# Compiled by:
#
src/lib/c-kit/src/ast/ast.sublib# K&R2, A11.1, C names fall into four spaces. Same name may be used for different
# purposes in the same scope if the uses are in different name spaces. These spaces
# are: 1. Chunks, functions, typedef names, and enum constants.
# 2. Labels
# 3. Tags of structures, unions, and enumerations
# 4. Member of structures are unions individually.
#
# Member is (id * id), the first id is the id of the package and the second is the
# real member. Whenever you get up a Member, you must know the struct_ty. If you
# know the struct_ty, you know the first id (see CTYPE), and then you can get a
# unique mapping in the lookup.
api Symbol {
Symbol_Kind = CHUNK
| FUNCTION | TYPEDEF | ENUMCONST | LABEL | TAG | MEMBER tid::Uid;
Symbol;
symbol: { name: String, kind: Symbol_Kind } -> Symbol;
name: Symbol -> String;
kind: Symbol -> Symbol_Kind;
equal: (Symbol, Symbol) -> Bool;
compare: (Symbol, Symbol) -> Order;
label: String -> Symbol;
chunk: String -> Symbol;
fn: String -> Symbol;
typedef: String -> Symbol;
enum_const: String -> Symbol;
tag: String -> Symbol;
member: (tid::Uid, String) -> Symbol;
};
## Copyright (c) 1998 by Lucent Technologies
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.