diff options
author | Piotr Fusik <piotr@fusion-lang.org> | 2024-02-16 19:21:52 +0100 |
---|---|---|
committer | Piotr Fusik <piotr@fusion-lang.org> | 2024-02-16 19:21:52 +0100 |
commit | 8edec9b3596e1c7cb5db551b6da0e3ba1c90bb5e (patch) | |
tree | 3b2a0164ca696dac064656d85fd9289e67865124 | |
parent | 16cdca9616f6c80a60b52b92ac02d4cc3aa39345 (diff) |
[json] Python type annotation.
Fixes host-diff
#140
-rw-r--r-- | GenPy.fu | 5 | ||||
-rw-r--r-- | libfut.cpp | 3 | ||||
-rw-r--r-- | libfut.cs | 3 | ||||
-rw-r--r-- | libfut.js | 3 |
4 files changed, 13 insertions, 1 deletions
@@ -1,6 +1,6 @@ // GenPy.fu - Python code generator // -// Copyright (C) 2020-2023 Piotr Fusik +// Copyright (C) 2020-2024 Piotr Fusik // // This file is part of Fusion Transpiler, // see https://github.com/fusionlanguage/fut @@ -340,6 +340,9 @@ public class GenPy : GenPySwift Include("re"); Write("re.Match"); break; + case FuId.JsonElementClass: + Write("dict | list | str | float | bool | None"); + break; case FuId.LockClass: Include("threading"); Write("threading.RLock"); @@ -22464,6 +22464,9 @@ void GenPy::writeTypeAnnotation(const FuType * type, bool nullable) include("re"); write("re.Match"); break; + case FuId::jsonElementClass: + write("dict | list | str | float | bool | None"); + break; case FuId::lockClass: include("threading"); write("threading.RLock"); @@ -23323,6 +23323,9 @@ namespace Fusion Include("re"); Write("re.Match"); break; + case FuId.JsonElementClass: + Write("dict | list | str | float | bool | None"); + break; case FuId.LockClass: Include("threading"); Write("threading.RLock"); @@ -23900,6 +23900,9 @@ export class GenPy extends GenPySwift this.include("re"); this.write("re.Match"); break; + case FuId.JSON_ELEMENT_CLASS: + this.write("dict | list | str | float | bool | None"); + break; case FuId.LOCK_CLASS: this.include("threading"); this.write("threading.RLock"); |