File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,12 @@ callOp method:string args:Vector<TypedOpArg> = ActionOp;
1111getMessageOp flags:# peer:TypedOp id:TypedOp from_scheduled:flags.0? TypedOp = ActionOp ;
1212
1313// Field extraction path
14- pathPart flags:# constructor:string param:string flag_abort_if_empty:flags.0? true flag_fallback_if_empty:flags.1? TypedOp flag_passthrough:flags.2? true = PathPart ;
14+ paramNotFlag = ParamFlag ;
15+ paramIsFlagAbortIfEmpty = ParamFlag ;
16+ paramIsFlagFallback fallback:TypedOp = ParamFlag ;
17+ paramIsFlagPassthrough = ParamFlag ;
18+
19+ pathPart flags:# constructor:string param:string flag:ParamFlag = PathPart ;
1520
1621path parts:Vector<PathPart > = Path ;
1722pathParent parts:Vector<PathPart > = Path ;
Original file line number Diff line number Diff line change @@ -63,10 +63,11 @@ final protected function buildPath(TLContext $tl): array
6363 '_ ' => 'pathPart ' ,
6464 'constructor ' => $ part [0 ],
6565 'param ' => $ part [1 ],
66+ 'flag ' => ['_ ' => 'paramNotFlag ' ],
6667 ];
6768 if (isset ($ part [2 ])) {
6869 if ($ part [2 ] instanceof TypedOp) {
69- $ newPart ['flag_fallback_if_empty ' ] = $ part [2 ]->build ($ tl );
70+ $ newPart ['flag ' ] = [ ' _ ' => ' paramIsFlagFallback ' , ' fallback ' => $ part [2 ]->build ($ tl )] ;
7071 } elseif (\is_int ($ part [2 ])) {
7172 if ($ part [2 ] & self ::FLAG_UNPACK_ARRAY ) {
7273 if ($ tl ->buildMode instanceof Ast && !$ tl ->buildMode ->allowUnpacking ) {
@@ -75,10 +76,10 @@ final protected function buildPath(TLContext $tl): array
7576 $ newPart ['unpack_vector ' ] = true ;
7677 }
7778 if ($ part [2 ] & self ::FLAG_IF_ABSENT_ABORT ) {
78- $ newPart ['flag_abort_if_empty ' ] = true ;
79+ $ newPart ['flag ' ] = [ ' _ ' => ' paramIsFlagAbortIfEmpty ' ] ;
7980 }
8081 if ($ part [2 ] & self ::FLAG_PASSTHROUGH ) {
81- $ newPart ['flag_passthrough ' ] = true ;
82+ $ newPart ['flag ' ] = [ ' _ ' => ' paramIsFlagPassthrough ' ] ;
8283 }
8384 }
8485 }
You can’t perform that action at this time.
0 commit comments