?? scope.h
字號:
#ifndef SCOPE_H#define SCOPE_Htypedef struct scope Scope;#include "declaration.h"Scope *new_scope(void); /* Start a new scope. The parent of that scope will * be current_scope */void leave_scope(void); /* Set current scope to current_scope->parent */void delete_scope(Scope *);void declare(const char *key, Declaration *decl); /* Link the string 'key' to the declaration 'decl', * in current_scope! When 'key' already exists in * current_scope, error() is called with an * appropriate message. */Declaration *lookup(const Scope *, const char *key); /* Lookup 'key' in the specified scope and in its * parent scopes. When found, return the Declaration * it is linked to. The first match (inner most scope) * is returned. */Declaration *lookup_in_this_scope(const Scope *, const char *key); /* As lookup(), but just search this one scope. */extern Scope *current_scope, *global_scope; /* global_scope is the outer most scope, containing * the global Asterix declarations. current_scope is * used during parsing and points to the current scope * at the point in the Asterix source that the parser * is currently processing. */#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -