Skip to content
This repository has been archived by the owner on Oct 11, 2020. It is now read-only.
This repository has been archived by the owner on Oct 11, 2020. It is now read-only.

Syntax color for objects #45

Open
giltho opened this issue Jan 31, 2020 · 0 comments
Open

Syntax color for objects #45

giltho opened this issue Jan 31, 2020 · 0 comments

Comments

@giltho
Copy link
Contributor

giltho commented Jan 31, 2020

Hello,

There seem to be a bug with the syntax highlighting when using objects. I know this is not a largely used feature of OCaml but I'm experimenting with objects at the moment and it seems that the hightlighting there is not correct.

The following code

class ['s] list_monoid = object
  inherit ['s] VisitorsRuntime.monoid
  method private zero = []
  method private plus = (@)
end

let literal_base_elements (lit : Literal.t) : Literal.t list =
  let v = object
    inherit [_] Visitors.reduce as super
    inherit [_] list_monoid
    method visit_literal e = function
    | LList _ as l -> super#visit_literal e l
    | l -> [l]
  end in
  v#visit_literal () lit

which compiles properly doesn't get highlighted properly.

image

I think this problem is inherited from every other syntax of OCaml for vscode

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant