Added syntax colorization. Remove all references to deprecated lark_to_lezer module.
This commit is contained in:
@@ -9,10 +9,7 @@ from abc import ABC, abstractmethod
|
||||
from functools import cached_property
|
||||
from typing import List, Dict, Any
|
||||
|
||||
# TODO: Replace with lark_to_simple_mode when implemented
|
||||
from myfasthtml.core.dsl.lark_to_lezer import (
|
||||
extract_completions_from_grammar, # Will be moved to utils.py
|
||||
)
|
||||
from myfasthtml.core.dsl.lark_to_simple_mode import extract_completions_from_grammar
|
||||
from myfasthtml.core.utils import make_safe_id
|
||||
|
||||
|
||||
@@ -82,13 +79,13 @@ class DSLDefinition(ABC):
|
||||
|
||||
Returns:
|
||||
Dictionary with:
|
||||
- 'lezerGrammar': The Lezer grammar string
|
||||
- 'simpleModeConfig': The CodeMirror Simple Mode configuration
|
||||
- 'completions': The completion items
|
||||
- 'name': The DSL name
|
||||
"""
|
||||
return {
|
||||
"name": self.name,
|
||||
"lezerGrammar": self.lezer_grammar,
|
||||
"simpleModeConfig": self.simple_mode_config,
|
||||
"completions": self.completions,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user