Add 'xo-expression/' from commit '5ac3c03a0c'
git-subtree-dir: xo-expression git-subtree-mainline:d0f5ccc1cegit-subtree-split:5ac3c03a0c
This commit is contained in:
commit
aecabbb144
46 changed files with 3241 additions and 0 deletions
29
xo-expression/include/xo/expression/binding_path.hpp
Normal file
29
xo-expression/include/xo/expression/binding_path.hpp
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/* file binding_path.hpp
|
||||
*
|
||||
* author: Roland Conybeare, Jul 2024
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace xo {
|
||||
namespace ast {
|
||||
/** @class path
|
||||
*
|
||||
* @brief path from the *use* of a variable to the environment
|
||||
* providing its location.
|
||||
**/
|
||||
struct binding_path {
|
||||
/** @of parent links to traverse. -1 if global. -2 if sentinel **/
|
||||
int i_link_ = -2;
|
||||
/** for variables bound in some local environment:
|
||||
* slot# within that environment.
|
||||
*
|
||||
* Ignored if @ref i_link_ is -1
|
||||
**/
|
||||
int j_slot_ = 0;
|
||||
}; /*binding_path*/
|
||||
} /*namespace ast*/
|
||||
} /*namespace xo*/
|
||||
|
||||
|
||||
/* end binding_path.hpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue