Source code for zyntex.parsing.syntax.node_element

from abc import ABC, abstractmethod


[docs] class INodeElement(ABC): """Base class for all Zig AST node wrappers.""" @abstractmethod def __init__(self, *args, **kwargs): raise NotImplementedError def __repr__(self) -> str: return f"INodeElement.{self.__class__.__name__}"
[docs] @classmethod @abstractmethod def from_node(cls, node): raise NotImplementedError
[docs] @staticmethod @abstractmethod def is_node_valid(node) -> bool: raise NotImplementedError