Numworks Epsilon  1.4.1
Graphing Calculator Operating System
scope.h File Reference
#include "py/parse.h"
#include "py/emitglue.h"

Go to the source code of this file.

Classes

struct  _id_info_t
 
struct  _scope_t
 

Macros

#define SCOPE_IS_FUNC_LIKE(s)   ((s) >= SCOPE_LAMBDA)
 

Typedefs

typedef struct _id_info_t id_info_t
 
typedef struct _scope_t scope_t
 

Enumerations

enum  {
  ID_INFO_KIND_GLOBAL_IMPLICIT, ID_INFO_KIND_GLOBAL_EXPLICIT, ID_INFO_KIND_LOCAL, ID_INFO_KIND_CELL,
  ID_INFO_KIND_FREE
}
 
enum  { ID_FLAG_IS_PARAM = 0x01, ID_FLAG_IS_STAR_PARAM = 0x02, ID_FLAG_IS_DBL_STAR_PARAM = 0x04 }
 
enum  scope_kind_t {
  SCOPE_MODULE, SCOPE_CLASS, SCOPE_LAMBDA, SCOPE_LIST_COMP,
  SCOPE_DICT_COMP, SCOPE_SET_COMP, SCOPE_GEN_EXPR, SCOPE_FUNCTION
}
 

Functions

scope_tscope_new (scope_kind_t kind, mp_parse_node_t pn, qstr source_file, mp_uint_t emit_options)
 
void scope_free (scope_t *scope)
 
id_info_tscope_find_or_add_id (scope_t *scope, qstr qstr, bool *added)
 
id_info_tscope_find (scope_t *scope, qstr qstr)
 
id_info_tscope_find_global (scope_t *scope, qstr qstr)
 
void scope_find_local_and_close_over (scope_t *scope, id_info_t *id, qstr qst)
 

Macro Definition Documentation

◆ SCOPE_IS_FUNC_LIKE

#define SCOPE_IS_FUNC_LIKE (   s)    ((s) >= SCOPE_LAMBDA)

Definition at line 55 of file scope.h.

Typedef Documentation

◆ id_info_t

typedef struct _id_info_t id_info_t

◆ scope_t

typedef struct _scope_t scope_t

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ID_INFO_KIND_GLOBAL_IMPLICIT 
ID_INFO_KIND_GLOBAL_EXPLICIT 
ID_INFO_KIND_LOCAL 
ID_INFO_KIND_CELL 
ID_INFO_KIND_FREE 

Definition at line 32 of file scope.h.

◆ anonymous enum

anonymous enum
Enumerator
ID_FLAG_IS_PARAM 
ID_FLAG_IS_STAR_PARAM 
ID_FLAG_IS_DBL_STAR_PARAM 

Definition at line 40 of file scope.h.

◆ scope_kind_t

Enumerator
SCOPE_MODULE 
SCOPE_CLASS 
SCOPE_LAMBDA 
SCOPE_LIST_COMP 
SCOPE_DICT_COMP 
SCOPE_SET_COMP 
SCOPE_GEN_EXPR 
SCOPE_FUNCTION 

Definition at line 58 of file scope.h.

Function Documentation

◆ scope_find()

id_info_t* scope_find ( scope_t scope,
qstr  qstr 
)

◆ scope_find_global()

id_info_t* scope_find_global ( scope_t scope,
qstr  qstr 
)

◆ scope_find_local_and_close_over()

void scope_find_local_and_close_over ( scope_t scope,
id_info_t id,
qstr  qst 
)

◆ scope_find_or_add_id()

id_info_t* scope_find_or_add_id ( scope_t scope,
qstr  qstr,
bool added 
)

◆ scope_free()

void scope_free ( scope_t scope)

◆ scope_new()

scope_t* scope_new ( scope_kind_t  kind,
mp_parse_node_t  pn,
qstr  source_file,
mp_uint_t  emit_options 
)