Skip to content

Commit

Permalink
Also extern typedef doesn't make much sense I think?
Browse files Browse the repository at this point in the history
  • Loading branch information
kLabz committed Feb 5, 2024
1 parent 43e0b0c commit e8555b1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/core/ast.ml
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ type abstract_flag =

type typedef_flag =
| TDPrivate
| TDExtern

type enum_constructor = {
ec_name : placed_name;
Expand Down
2 changes: 1 addition & 1 deletion src/core/display/completionItem.ml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ module CompletionModuleType = struct
params = d.d_params;
meta = d.d_meta;
doc = d.d_doc;
is_extern = List.mem TDExtern d.d_flags;
is_extern = false;
is_final = false;
is_abstract = false;
kind = kind;
Expand Down
4 changes: 2 additions & 2 deletions src/macro/macroApi.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1617,7 +1617,7 @@ let decode_type_def v =
in
EEnum (mk (if isExtern then [EExtern] else []) (List.map conv fields))
| 1, [] ->
ETypedef (mk (if isExtern then [TDExtern] else []) (CTAnonymous fields,pos))
ETypedef (mk [] (CTAnonymous fields,pos))
| 2, [ext;impl;interf;final;abstract] ->
let flags = if isExtern then [HExtern] else [] in
let is_interface = decode_opt_bool interf in
Expand All @@ -1636,7 +1636,7 @@ let decode_type_def v =
let flags = if is_abstract then HAbstract :: flags else flags in
EClass (mk flags fields)
| 3, [t] ->
ETypedef (mk (if isExtern then [TDExtern] else []) (decode_ctype t))
ETypedef (mk [] (decode_ctype t))
| 4, [tthis;tflags;tfrom;tto] ->
let flags = match opt decode_array tflags with
| None -> []
Expand Down
3 changes: 1 addition & 2 deletions src/syntax/parser.ml
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,7 @@ let decl_flag_to_abstract_flag (flag,p) = match flag with

let decl_flag_to_typedef_flag (flag,p) = match flag with
| DPrivate -> Some TDPrivate
| DExtern -> Some TDExtern
| DFinal | DMacro | DDynamic | DInline | DPublic | DStatic | DOverload -> unsupported_decl_flag_typedef flag p
| DExtern | DFinal | DMacro | DDynamic | DInline | DPublic | DStatic | DOverload -> unsupported_decl_flag_typedef flag p

let decl_flag_to_module_field_flag (flag,p) = match flag with
| DPrivate -> Some (APrivate,p)
Expand Down

0 comments on commit e8555b1

Please sign in to comment.