package Ġme . mat t co . ree va . ast . statements Ċ Ċ import Ġme . mat t co . ree va . ast .* Ċ Ċ class ĠLex ical Declaration Node ( ĊĠĠĠ Ġval Ġis Const : ĠBoolean , ĊĠĠĠ Ġval Ġbinding List : ĠBinding ListNode Ċ ) Ġ: ĠNode Base ( listOf ( binding List )), ĠDeclaration Node Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġbound Names () Ġ= Ġbinding List . bound Names () ĊĊĠĠĠ Ġoverride Ġfun Ġcontains Duplicate Labels ( label Set : ĠSet < String >) Ġ= Ġfalse ĊĊĠĠĠ Ġoverride Ġfun Ġcontains Undefined Break Target ( label Set : ĠSet < String >) Ġ= Ġfalse ĊĊĠĠĠ Ġoverride Ġfun Ġcontains Undefined Continue Target ( iteration Set : ĠSet < String >, Ġlabel Set : ĠSet < String >) Ġ= Ġfalse ĊĊĠĠĠ Ġoverride Ġfun Ġdeclaration Part () Ġ= Ġthis ĊĊĠĠĠ Ġoverride Ġfun Ġis Constant Declaration () Ġ= Ġis Const ĊĊĠĠĠ Ġoverride Ġfun Ġlex ically Declared Names () Ġ= Ġbound Names () ĊĊĠĠĠ Ġoverride Ġfun Ġlex ically Scoped Declarations () Ġ= ĠlistOf ( this ) ĊĊĠĠĠ Ġoverride Ġfun Ġtop Level Lex ically Declared Names () Ġ= Ġbound Names () ĊĊĠĠĠ Ġoverride Ġfun Ġtop Level Lex ically Scoped Declarations () Ġ= ĠlistOf ( this ) ĊĊĠĠĠ Ġoverride Ġfun Ġtop Level Var Declared Names () Ġ= Ġempty List < String >() ĊĊĠĠĠ Ġoverride Ġfun Ġtop Level Var Scoped Declarations () Ġ= Ġempty List < Node Base >() ĊĊĠĠĠ Ġoverride Ġfun Ġvar Declared Names () Ġ= Ġempty List < String >() ĊĊĠĠĠ Ġoverride Ġfun Ġvar Scoped Declarations () Ġ= Ġempty List < Node Base >() Ċ } Ċ Ċ class ĠBinding ListNode ( val Ġlex ical Bindings : ĠList < Lex ical Binding Node >) Ġ: ĠNode Base ( lexical Bindings ), ĠStatement Node Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġbound Names () Ġ= Ġlex ical Bindings . flatMap ( Node Base :: bound Names ) Ċ } Ċ Ċ class ĠLex ical Binding Node ( ĊĠĠĠ Ġval Ġidentifier : ĠBinding Identifier Node , ĊĠĠĠ Ġval Ġinitializer : ĠInitial izer Node ? Ċ ) Ġ: ĠNode Base ( listOf NotNull ( identifier , Ġinitializer )), ĠStatement Node Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġbound Names () Ġ= Ġidentifier . bound Names () Ċ } Ċ Ċ class ĠVariable Statement Node ( val Ġdeclarations : ĠVariable Declaration List ) Ġ: ĠNode Base ( listOf ( declarations )), ĠStatement Node Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġvar Declared Names () Ġ= Ġdeclarations . bound Names () ĊĊĠĠĠ Ġoverride Ġfun Ġtop Level Var Declared Names () Ġ= Ġvar Declared Names () Ċ } Ċ Ċ class ĠVariable Declaration List ( val Ġdeclarations : ĠList < Variable Declaration Node >) Ġ: ĠNode Base ( declarations ), ĠStatement Node Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġbound Names () Ġ= Ġdeclarations . flatMap ( Node Base :: bound Names ) ĊĊĠĠĠ Ġoverride Ġfun Ġvar Scoped Declarations () Ġ= Ġdeclarations Ċ } Ċ Ċ class ĠVariable Declaration Node ( ĊĠĠĠ Ġval Ġidentifier : ĠBinding Identifier Node , ĊĠĠĠ Ġval Ġinitializer : ĠInitial izer Node ? Ċ ) Ġ: ĠNode Base ( listOf NotNull ( identifier , Ġinitializer )), ĠStatement Node Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġbound Names () Ġ= Ġidentifier . bound Names () ĊĊĠĠĠ Ġoverride Ġfun Ġvar Scoped Declarations () Ġ= ĠlistOf ( this ) Ċ } Ċ