Skip to content

Commit

Permalink
hotfix: broken annotations in legacy format (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
DedAzaMarks authored Mar 14, 2024
1 parent 181fae0 commit bb00ec6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion internal/tlast/qt_combined2tl.qtpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func compareModifiers(a, b Modifier) bool {
}
-%}
{%- for _, mod := range modifiers -%}
{%s= mod.Name%}{% space %}
@{%s= mod.Name%}{% space %}
{%- endfor -%}
{%= descriptor.Construct.Name.String() -%}
#{%s= fmt.Sprintf("%08x", descriptor.Crc32()) %}
Expand Down
1 change: 1 addition & 0 deletions internal/tlast/qt_combined2tl.qtpl.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions internal/tlast/tlgen_tlo.go
Original file line number Diff line number Diff line change
Expand Up @@ -474,17 +474,17 @@ func typeRefToExprUnion(mc paramScope, allCombinators map[string]*Combinator, tl
func modifierToFlag(ms []Modifier) (res int32) {
for _, m := range ms {
switch m.Name {
case "@any":
case "any":
res |= 0
case "@read":
case "read":
res |= 1
case "@write":
case "write":
res |= 2
case "@readwrite":
case "readwrite":
res |= 1 | 2
case "@internal":
case "internal":
res |= 4
case "@kphp":
case "kphp":
res |= 8
}
}
Expand Down

0 comments on commit bb00ec6

Please sign in to comment.