File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,12 @@ callOp method:string args:Vector<TypedOpArg> = ActionOp;
11
11
getMessageOp flags:# peer:TypedOp id:TypedOp from_scheduled:flags.0? TypedOp = ActionOp ;
12
12
13
13
// 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 ;
15
20
16
21
path parts:Vector<PathPart > = Path ;
17
22
pathParent 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
63
63
'_ ' => 'pathPart ' ,
64
64
'constructor ' => $ part [0 ],
65
65
'param ' => $ part [1 ],
66
+ 'flag ' => ['_ ' => 'paramNotFlag ' ],
66
67
];
67
68
if (isset ($ part [2 ])) {
68
69
if ($ part [2 ] instanceof TypedOp) {
69
- $ newPart ['flag_fallback_if_empty ' ] = $ part [2 ]->build ($ tl );
70
+ $ newPart ['flag ' ] = [ ' _ ' => ' paramIsFlagFallback ' , ' fallback ' => $ part [2 ]->build ($ tl )] ;
70
71
} elseif (\is_int ($ part [2 ])) {
71
72
if ($ part [2 ] & self ::FLAG_UNPACK_ARRAY ) {
72
73
if ($ tl ->buildMode instanceof Ast && !$ tl ->buildMode ->allowUnpacking ) {
@@ -75,10 +76,10 @@ final protected function buildPath(TLContext $tl): array
75
76
$ newPart ['unpack_vector ' ] = true ;
76
77
}
77
78
if ($ part [2 ] & self ::FLAG_IF_ABSENT_ABORT ) {
78
- $ newPart ['flag_abort_if_empty ' ] = true ;
79
+ $ newPart ['flag ' ] = [ ' _ ' => ' paramIsFlagAbortIfEmpty ' ] ;
79
80
}
80
81
if ($ part [2 ] & self ::FLAG_PASSTHROUGH ) {
81
- $ newPart ['flag_passthrough ' ] = true ;
82
+ $ newPart ['flag ' ] = [ ' _ ' => ' paramIsFlagPassthrough ' ] ;
82
83
}
83
84
}
84
85
}
You can’t perform that action at this time.
0 commit comments