Skip to content

Commit

Permalink
MPositionable
Browse files Browse the repository at this point in the history
- Added
  • Loading branch information
deavmi committed May 9, 2024
1 parent 448038a commit 0cec777
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions source/tlang/compiler/symbols/mcro.d
Expand Up @@ -151,4 +151,24 @@ public interface MComparable
ERROR
}

}

/**
* Defines an interface for determining
* the position of an AST node nested
* within the implementing one
*/
public interface MPositionable
{
/**
* Determines the position of the
* given AST node within this
* node
*
* Params:
* statement = the statement
* Returns: the position or -1
* if invalid
*/
public size_t position(Statement statement);
}

0 comments on commit 0cec777

Please sign in to comment.