Smart indentation management for code parsing 더 자세히 ...
#include <smartDedent.hpp>
Public 멤버 함수 | |
| me & | countDown () |
| Decrements the internal count, typically indicating a pending dedent. | |
| me & | countUp () |
| Increments the internal count, typically indicating a pending dedent. | |
| me & | useLater () |
| Enables dedent tracking for future parsing, deferring any pending dedents. | |
| nint | dedent () |
| Generates and returns a dedent token based on the internal count. | |
| void | rel () |
| nbool | canDedent () const |
| nbool | isOn () const |
by::typeProvidable(으)로부터 상속된 Public 멤버 함수 | |
| nbool | operator== (const me &rhs) const |
| nbool | operator!= (const me &rhs) const |
| virtual const type & | getType () const =0 |
| nbool | isSub (const type &it) const |
| nbool | isSub (const type *it) const BY_SIDE_FUNC(isSub) |
| nbool | isSub (const me &it) const |
| nbool | isSub (const me *it) const BY_SIDE_FUNC(isSub) |
| nbool | isSuper (const type &it) const |
| nbool | isSuper (const type *it) const BY_SIDE_FUNC(isSuper) |
| nbool | isSuper (const me &it) const |
| nbool | isSuper (const me *it) const BY_SIDE_FUNC(isSuper) |
| template<typename T > | |
| nint | isSub () const |
| template<typename T > | |
| nint | isSuper () const |
| template<typename T > | |
| T * | cast () |
| template<typename T > | |
| const T * | cast () const BY_CONST_FUNC(cast< T >()) virtual void *cast(const type &to) |
| Safe cast to target type using type hierarchy information | |
| const void * | cast (const type &to) const BY_CONST_FUNC(cast(to)) void *cast(const type *it) BY_SIDE_FUNC(cast) |
by::clonable(으)로부터 상속된 Public 멤버 함수 | |
| virtual me * | clone () const =0 |
| virtual me * | cloneDeep () const |
| virtual void | onCloneDeep (const me &from) |
Smart indentation management for code parsing
A class that parser uses to count and manage in an array how many leading spaces there are each time it creates a scope with indentation. For example, when parsing the following byeol code:
If the parser is parsing at position 1, smartDedent's internal array value is [0, 4, 6]. That is, the number of spaces for the outermost scope is smartDedent[0] = 0, and the number of spaces proving it's the scope of the innermost device scope is smartDedent[smartDedent.len() - 1] = 6, meaning there should be 6 leading spaces.
| me & by::smartDedent::countDown | ( | ) |
Decrements the internal count, typically indicating a pending dedent.
| me & by::smartDedent::countUp | ( | ) |
Increments the internal count, typically indicating a pending dedent.
| nint by::smartDedent::dedent | ( | ) |
Generates and returns a dedent token based on the internal count.
| me & by::smartDedent::useLater | ( | ) |
Enables dedent tracking for future parsing, deferring any pending dedents.