How to define multiple list for autocomplete using codemirror?

I make my own language and using codemirror editor , In my language
all class and his methodes defined , so the user only can use class , he
can’t define a new class …

For example :

Class A have methods (do1,do2,do3)

Class B have methods (any,click)

I knew how to add all keywords for my language to list and do autocomplete on it using codemirror …

My question is :

For example :
I want when the user type classA then type “.” Display list only have the
methods contain in class A (do1,do2, do3) I don’t want to display
keywords or methods of class B within the list of class A …
So how I can do it with codemirror?

my try But not work my try

My problem solved thanks for all