Skip to main content

crashtest.hxsmith.features.anon

Anonymous structures: typedefs, object literals, field access, optional fields, structural subtyping.

class Anon(Feature)​

name​

name = 'anon'

summary​

summary = 'typedefs of anonymous structures, object literals, optional fields, structural subtyping'

covers​

covers = ('EObjectDecl', 'EField', 'ECheckType', 'ETypedef', 'OpNullCoal', 'EParenthesis')

order​

order = 27

declare​

def declare(g: Gen) -> None

types​

def types(g: Gen, depth: int)

show​

def show(g: Gen, ty: Ty, expr: str) -> Optional[str]

exprs​

def exprs(g: Gen, ty: Ty)

stmts​

def stmts(g: Gen)

class Field​

name: str​

ty: Ty​

opt: bool​

opt = False

hint​

def hint() -> str

init​

def __init__(name: str, ty: Ty, opt: bool = False) -> None

class State​

shapes: Dict[Ty, List[Field]]​

named: List[Ty]​

helpers: Dict[Ty, str]​

init​

def __init__(shapes: Dict[Ty, List[Field]], named: List[Ty], helpers: Dict[Ty, str]) -> None