From e974125ec613885fc3a599c0398cd5d120418fd7 Mon Sep 17 00:00:00 2001 From: Utkarsh Gupta Date: Wed, 5 Dec 2018 05:42:38 +0530 Subject: [PATCH] data/Language/Flow.yaml: Add Flow definition This adds definition of Flow, a static type checker for JS. Closes #51 --- data/DataType/boolean_flow.yaml | 7 ++++ data/DataType/null_flow.yaml | 3 ++ data/DataType/number_flow.yaml | 4 +++ data/DataType/string_flow.yaml | 4 +++ data/DataType/void_flow.yaml | 4 +++ data/Delimiter/curly_braces_pipe.yaml | 3 ++ data/LangDerived/js_flow.yaml | 1 + data/Language/Flow.yaml | 51 +++++++++++++++++++++++++++ models/LangDerived.yaml | 1 + models/Language.yaml | 1 + 10 files changed, 79 insertions(+) create mode 100644 data/DataType/boolean_flow.yaml create mode 100644 data/DataType/null_flow.yaml create mode 100644 data/DataType/number_flow.yaml create mode 100644 data/DataType/string_flow.yaml create mode 100644 data/DataType/void_flow.yaml create mode 100644 data/Delimiter/curly_braces_pipe.yaml create mode 100644 data/LangDerived/js_flow.yaml create mode 100644 data/Language/Flow.yaml create mode 100644 models/LangDerived.yaml diff --git a/data/DataType/boolean_flow.yaml b/data/DataType/boolean_flow.yaml new file mode 100644 index 0000000..cb6b11f --- /dev/null +++ b/data/DataType/boolean_flow.yaml @@ -0,0 +1,7 @@ +keyword: boolean +integer-min: '0' +integer-max: '1' +integer-signed: false +literals: + - 'true' + - 'false' diff --git a/data/DataType/null_flow.yaml b/data/DataType/null_flow.yaml new file mode 100644 index 0000000..534b32f --- /dev/null +++ b/data/DataType/null_flow.yaml @@ -0,0 +1,3 @@ +keyword: null +integer-min: '0' +integer-max: '0' diff --git a/data/DataType/number_flow.yaml b/data/DataType/number_flow.yaml new file mode 100644 index 0000000..1efd589 --- /dev/null +++ b/data/DataType/number_flow.yaml @@ -0,0 +1,4 @@ +keyword: number +integer-min: 'uncertain' +integer-max: 'uncertain' +integer-signed: true diff --git a/data/DataType/string_flow.yaml b/data/DataType/string_flow.yaml new file mode 100644 index 0000000..4bdf086 --- /dev/null +++ b/data/DataType/string_flow.yaml @@ -0,0 +1,4 @@ +keyword: string +delimiters: + - single_quote + - double_quote diff --git a/data/DataType/void_flow.yaml b/data/DataType/void_flow.yaml new file mode 100644 index 0000000..32a1618 --- /dev/null +++ b/data/DataType/void_flow.yaml @@ -0,0 +1,4 @@ +keyword: void +integer-min: '0' +integer-max: '0' +integer-signed: false diff --git a/data/Delimiter/curly_braces_pipe.yaml b/data/Delimiter/curly_braces_pipe.yaml new file mode 100644 index 0000000..64545dd --- /dev/null +++ b/data/Delimiter/curly_braces_pipe.yaml @@ -0,0 +1,3 @@ +type: block +start: '{|' +end: '|}' diff --git a/data/LangDerived/js_flow.yaml b/data/LangDerived/js_flow.yaml new file mode 100644 index 0000000..715f688 --- /dev/null +++ b/data/LangDerived/js_flow.yaml @@ -0,0 +1 @@ +name: JavaScript diff --git a/data/Language/Flow.yaml b/data/Language/Flow.yaml new file mode 100644 index 0000000..c8515f1 --- /dev/null +++ b/data/Language/Flow.yaml @@ -0,0 +1,51 @@ +identifier: Flow +full_name: Flow +wikidata: Q59413589 +creation_date: 2014 +extensions: + - js.flow +language_derivative: + - JavaScript +line_continuation: + - backslash +delimiters: + - double_slash + - multiline_slash_star + - single_quote_slash_escape + - double_quote_slash_escape + - curly_braces + - round_braces + - square_braces + - backticks + - curly_braces_pipe +keywords: + - declare + - string + - boolean + - string + - number + - typeof + - return + - if + - let + - var + - function + - const + - object + - serialize + - interface + - implements + - array + - class + - new + - this + - constructor + - opaque + - type + - import +datatypes: + - boolean_flow + - number_flow + - string_flow + - void_flow + - null_flow diff --git a/models/LangDerived.yaml b/models/LangDerived.yaml new file mode 100644 index 0000000..8845d6f --- /dev/null +++ b/models/LangDerived.yaml @@ -0,0 +1 @@ +# pk: String diff --git a/models/Language.yaml b/models/Language.yaml index 9146336..90a604e 100644 --- a/models/Language.yaml +++ b/models/Language.yaml @@ -13,6 +13,7 @@ versions: String grammar_file: String aliases: Alias[] extensions: FileExtension[] +language_derivative: LangDerived[] line_continuation: LineCont[] delimiters: Delimiter[] datatypes: DataType[]