Skip to content

Commit 1fb4550

Browse files
committed
Merge branch 'topic/java_bindings' into 'master'
Rework the Java bindings to be more efficient and safe Closes langkit-query-language#8 See merge request eng/libadalang/langkit!825
2 parents 9ccb0f7 + be5e1bc commit 1fb4550

File tree

30 files changed

+3784
-2297
lines changed

30 files changed

+3784
-2297
lines changed

langkit/expressions/base.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1903,7 +1903,10 @@ def render_python_constant(self):
19031903
return 'None' if self.type.is_entity_type else self.type.py_nullexpr
19041904

19051905
def render_java_constant(self):
1906-
return 'null' if self.type.is_entity_type else self.type.java_nullexpr
1906+
t = self.type
1907+
if t.is_ast_node:
1908+
t = t.entity
1909+
return f'{t.astnode.kwless_raw_name.camel}.NONE'
19071910

19081911
def render_ocaml_constant(self):
19091912
return 'None'

0 commit comments

Comments
 (0)