From 48b36a76c2c1a56158e2eb8a42f3e8ab3ea0fad8 Mon Sep 17 00:00:00 2001 From: David Yu Yang Date: Wed, 1 Dec 2021 12:34:50 +0800 Subject: [PATCH] Add gdscript entry in new parser docs --- docs/parser-gdscript.rst | 17 +++++++++++++++++ docs/parsers.rst | 1 + 2 files changed, 18 insertions(+) create mode 100644 docs/parser-gdscript.rst diff --git a/docs/parser-gdscript.rst b/docs/parser-gdscript.rst new file mode 100644 index 0000000000..b944c9823b --- /dev/null +++ b/docs/parser-gdscript.rst @@ -0,0 +1,17 @@ +.. _gdscript: + +====================================================================== +The new GDScript parser +====================================================================== + +The GDScript parser is written using the token based Python parser as a base +due to similarities with the Python language. Some adjustments have been made +for the differences between GDScript and Python. A short list of major +differences: + +- Files are classes. All symbols are attributes of the class defined by the +file. +- There are no functions because all symbols are class attributes, so all +"functions" are methods. +- Variables are explicitly declared with the `var` keyword. +- Enum, signal and const keywords are added. diff --git a/docs/parsers.rst b/docs/parsers.rst index b84f14d16a..723fa5af04 100644 --- a/docs/parsers.rst +++ b/docs/parsers.rst @@ -15,6 +15,7 @@ This section deals with individual parser topics. parser-asm.rst parser-cmake.rst parser-cxx.rst + parser-gdscript.rst parser-html.rst parser-puppetManifest.rst parser-python.rst