File tree Expand file tree Collapse file tree 1 file changed +22
-14
lines changed Expand file tree Collapse file tree 1 file changed +22
-14
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env python
22
3+ from langkit .compile_context import CompileCtx
4+ import langkit .config as C
35from langkit .libmanage import ManageScript
6+ import langkit .names as names
7+ from langkit .utils import PluginLoader
48
59
610class Manage (ManageScript ):
711
812 ENABLE_BUILD_WARNINGS_DEFAULT = True
913
10- @property
11- def main_programs (self ):
12- return super ().main_programs
13-
14- def create_context (self , args ):
15-
16- from langkit .compile_context import AdaSourceKind , CompileCtx
17-
14+ def create_config (self ):
15+ return C .CompilationConfig (
16+ lkt = None ,
17+ library = C .LibraryConfig (
18+ root_directory = "." ,
19+ language_name = names .Name ("Lkql" ),
20+ short_name = "lkql" ,
21+ ),
22+ )
23+
24+ def create_context (self , config , verbosity ):
1825 from language .lexer import lkql_lexer
1926 from language .parser import lkql_grammar
2027
21- ctx = CompileCtx (lang_name = 'Lkql' ,
22- short_name = 'lkql' ,
23- lexer = lkql_lexer ,
24- grammar = lkql_grammar )
25-
26- return ctx
28+ return CompileCtx (
29+ config = config ,
30+ plugin_loader = PluginLoader (config .library .root_directory ),
31+ lexer = lkql_lexer ,
32+ grammar = lkql_grammar ,
33+ verbosity = verbosity ,
34+ )
2735
2836
2937if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments