summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_parser.cpp
AgeCommit message (Collapse)Author
2020-09-18Fix typos with codespellRémi Verschelde
Using codespell 1.17.1. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear dof doubleclick fave findn leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
2020-09-03[Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms.bruvzg
2020-09-01Change GDScript compiler to use codegen abstractionGeorge Marques
2020-09-01GDScript: Allow "extends" to be used inside inner classGeorge Marques
2020-09-01GDScript: Allow "self" to be used in class levelGeorge Marques
2020-08-26GDScript: Fix crash when parsing propertiesGeorge Marques
2020-08-26GDScript: Fix issues when deriving from other scriptsGeorge Marques
2020-08-19GDScript: Show error when function return type is missingGeorge Marques
2020-08-19GDScript: Fix signal parameters not respecting commasGeorge Marques
2020-08-19GDScript: Check duplicate keys in dictionaries and enumsGeorge Marques
2020-08-19GDScript: Allow preload() to be used with constant expressionsGeorge Marques
2020-08-19GDScript: Allow keywords to be used in $ notationGeorge Marques
2020-08-18GDScript: Allow enum values to be set to constant expressionsGeorge Marques
Also allow them to access previous values wihout referencing the enum.
2020-08-17GDScript: Allow empty files to be valid scriptsGeorge Marques
2020-08-17GDScript: Fix crash when superclass file is non-existentGeorge Marques
Incidentally, allow EOF to be an end of statement.
2020-08-17GDScript: Fix editor crash when writing @tool annotationGeorge Marques
2020-08-12Merge pull request #41104 from vnen/gdscript-assignment-tidyGeorge Marques
Tidy up assignment operator check
2020-08-11Merge pull request #41055 from snichols/null-callee-fixRémi Verschelde
Fix crash with null callee
2020-08-08GDScript: Tidy up assignment operator checkGeorge Marques
The operator is already gathered by the parser, no need to do it again in the analyzer.
2020-08-05Adding error message for empty grouping expressionStephen Nichols
2020-08-05Fixing null callee crash.Stephen Nichols
2020-08-01[GDScript] Add static HashMap cleanup.bruvzg
2020-07-22Wrap up GDScript 2.0 base implementationGeorge Marques
2020-07-20Reintroduce code completionGeorge Marques
2020-07-20Reenable GDScript LSP serverGeorge Marques
2020-07-20Added support for enums to be used as types in GDScriptGeorge Marques
2020-07-20Add warning checks in GDScript analyzerGeorge Marques
Reenable checking those when validating code.
2020-07-20Add new GDScript type checkerGeorge Marques
2020-07-20Add better local variable detection in GDScript parserGeorge Marques
Also store Variant operator to avoid needing to do it repeatedly in later compiling stages.
2020-07-20Add support for propertiesGeorge Marques
2020-07-20New GDScript tokenizer and parserGeorge Marques
Sometimes to fix something you have to break it first. This get GDScript mostly working with the new tokenizer and parser but a lot of things isn't working yet. It compiles and it's usable, and that should be enough for now. Don't worry: other huge commits will come after this.
2020-07-04Fix: editor crash on super constructor calledThakee Nathees
Fix: #39909
2020-06-16Merge pull request #39275 from ThakeeNathees/shadowed-warning-for-loop-counterRémi Verschelde
Added shadowed var warning for `for` loop counter
2020-06-16Merge pull request #39314 from ThakeeNathees/debugger-incorrect-line-fixRémi Verschelde
GDScript debugger stepping to incorrect line fix
2020-06-05Merge pull request #39301 from Calinou/fix-argument-parameter-confusionRémi Verschelde
Tweak the GDScript error message about passed argument type mismatch
2020-06-05Debugger stepping to incorrect line fixThakee Nathees
Fix: #39296
2020-06-04Tweak the GDScript error message about passed argument type mismatchHugo Locurcio
This makes it less confusing. This closes https://github.com/godotengine/godot-proposals/issues/670.
2020-06-04predefined var check for `for` loop counterThakee Nathees
2020-06-04shodowed var warning for `for` loop counterThakee Nathees
Fix: #39268
2020-05-21Merge pull request #33689 from jbuck3/signal-errorRémi Verschelde
Trigger an error when trying to define a preexisting signal in GDScript
2020-05-16gdscript_parser: Fix "unreachable code" false positive for loopsTan Wang Leng
Depending on the conditional statements of the 'for' and 'while' loops, their body may not even execute once. For example: func a(): var arr = [] for i in arr: return i # can be reached, but analysis says cannot return -1 func b(): var should_loop = false while should_loop: return 1 # can be reached, but analysis says cannot return 0 The parser will complain that the statements after the comment cannot be reached, but it is clearly possible for our scenario. This is because the parser falsely assumes that the loop body will always execute at least once. Fix the code to remove this assumption for both of those loops.
2020-05-15break, continue outside of a loop, match statement handledThakee Nathees
2020-05-14Merge pull request #38738 from akien-mga/cause-we-never-go-out-of-styleRémi Verschelde
Style: Remove new line at block start, enforce line between functions, enforce braces in if and loop blocks
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Merge pull request #38610 from ThakeeNathees/infer-type-null-errorRémi Verschelde
set parser error when infer type is null
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-05-14Merge pull request #38611 from ThakeeNathees/shadow-var-warning-bug-fixRémi Verschelde
shadowed var warning in nested block bug fix
2020-05-13set parser error when infer type is nullThakee Nathees
2020-05-13Merge pull request #38609 from ↵Rémi Verschelde
ThakeeNathees/range-crash-with-non-numeric-const-fix range() with non-numeric const argument crash fix