package Ġcom . dr j coding . p low . parser . parse _ functions . declaration _ parse _ functions Ċ Ċ import Ġcom . dr j coding . p low . lexer . Lex Token Stream Ċ import Ġcom . dr j coding . p low . parser . cst _ nodes . decl eration _ C ST _ nodes . Declaration C ST Node Ċ Ċ /** Ċ Ġ* ĠParses Ġa Ġseries Ġof Ġdeclarations Ġone Ġafter Ġanother . Ċ Ġ*/ Ċ fun Ġparse Declarations ( ts : ĠLex Token Stream ): ĠList < Declaration C ST Node > Ġ{ ĊĠĠĠ Ġval Ġdeclarations : ĠMutable List < Declaration C ST Node > Ġ= Ġmutable ListOf () ĊĠĠĠ Ġwhile Ġ( true ) Ġdeclarations . add ( parse Declaration ( ts ) Ġ?: Ġbreak ) ĊĠĠĠ Ġreturn Ġdeclarations Ċ } Ċ Ċ fun Ġparse Declaration ( ts : ĠLex Token Stream ): ĠDeclaration C ST Node ? Ġ= ĊĠĠĠ Ġparse Variable Declaration ( ts ) ĊĠĠĠĠĠĠĠ Ġ?: Ġparse Function Declaration ( ts ) ĊĠĠĠĠĠĠĠ Ġ?: Ġparse Class Declaration ( ts ) ĊĠĠĠĠĠĠĠ Ġ?: Ġparse Enum Declaration ( ts )