summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_parser.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* GDScript: Allow empty files to be valid scriptsGeorge Marques2020-08-171-6/+0
|
* GDScript: Fix crash when superclass file is non-existentGeorge Marques2020-08-171-3/+3
| | | | Incidentally, allow EOF to be an end of statement.
* GDScript: Fix editor crash when writing @tool annotationGeorge Marques2020-08-171-10/+12
|
* Merge pull request #41104 from vnen/gdscript-assignment-tidyGeorge Marques2020-08-121-1/+11
|\ | | | | Tidy up assignment operator check
| * GDScript: Tidy up assignment operator checkGeorge Marques2020-08-081-1/+11
| | | | | | | | | | The operator is already gathered by the parser, no need to do it again in the analyzer.
* | Merge pull request #41055 from snichols/null-callee-fixRémi Verschelde2020-08-111-2/+8
|\ \ | | | | | | Fix crash with null callee
| * | Adding error message for empty grouping expressionStephen Nichols2020-08-051-1/+5
| | |
| * | Fixing null callee crash.Stephen Nichols2020-08-051-1/+3
| |/
* / [GDScript] Add static HashMap cleanup.bruvzg2020-08-011-0/+4
|/
* Wrap up GDScript 2.0 base implementationGeorge Marques2020-07-221-44/+64
|
* Reintroduce code completionGeorge Marques2020-07-201-11/+197
|
* Reenable GDScript LSP serverGeorge Marques2020-07-201-0/+2
|
* Added support for enums to be used as types in GDScriptGeorge Marques2020-07-201-3/+7
|
* Add warning checks in GDScript analyzerGeorge Marques2020-07-201-1/+157
| | | | Reenable checking those when validating code.
* Add new GDScript type checkerGeorge Marques2020-07-201-0/+2
|
* Add better local variable detection in GDScript parserGeorge Marques2020-07-201-34/+233
| | | | | Also store Variant operator to avoid needing to do it repeatedly in later compiling stages.
* Add support for propertiesGeorge Marques2020-07-201-2/+206
|
* New GDScript tokenizer and parserGeorge Marques2020-07-201-8254/+2413
| | | | | | | | | | 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.
* Fix: editor crash on super constructor calledThakee Nathees2020-07-041-0/+3
| | | | Fix: #39909
* Merge pull request #39275 from ThakeeNathees/shadowed-warning-for-loop-counterRémi Verschelde2020-06-161-0/+7
|\ | | | | Added shadowed var warning for `for` loop counter
| * shodowed var warning for `for` loop counterThakee Nathees2020-06-041-0/+7
| | | | | | | | Fix: #39268
* | Merge pull request #39314 from ThakeeNathees/debugger-incorrect-line-fixRémi Verschelde2020-06-161-0/+2
|\ \ | | | | | | GDScript debugger stepping to incorrect line fix
| * | Debugger stepping to incorrect line fixThakee Nathees2020-06-051-0/+2
| |/ | | | | | | Fix: #39296
* | Merge pull request #39301 from Calinou/fix-argument-parameter-confusionRémi Verschelde2020-06-051-2/+2
|\ \ | | | | | | Tweak the GDScript error message about passed argument type mismatch
| * | Tweak the GDScript error message about passed argument type mismatchHugo Locurcio2020-06-041-2/+2
| |/ | | | | | | | | | | This makes it less confusing. This closes https://github.com/godotengine/godot-proposals/issues/670.
* / predefined var check for `for` loop counterThakee Nathees2020-06-041-0/+9
|/
* Merge pull request #33689 from jbuck3/signal-errorRémi Verschelde2020-05-211-0/+49
|\ | | | | Trigger an error when trying to define a preexisting signal in GDScript
| * Trigger an error when trying to define a preexisting signal in GDScriptJames Buck2019-11-251-0/+49
| | | | | | | | | | | | A class can't have multiple signals with the same name, but previously users would not be alerted to a conflict while editing the script where it occurred. Now a helpful error will appear in the editor during script parsing.
* | gdscript_parser: Fix "unreachable code" false positive for loopsTan Wang Leng2020-05-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | break, continue outside of a loop, match statement handledThakee Nathees2020-05-151-0/+35
| |
* | Merge pull request #38738 from akien-mga/cause-we-never-go-out-of-styleRémi Verschelde2020-05-141-382/+177
|\ \ | | | | | | Style: Remove new line at block start, enforce line between functions, enforce braces in if and loop blocks
| * | Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-97/+176
| | | | | | | | | | | | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
| * | Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-285/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #38610 from ThakeeNathees/infer-type-null-errorRémi Verschelde2020-05-141-0/+8
|\ \ \ | |/ / |/| | set parser error when infer type is null
| * | set parser error when infer type is nullThakee Nathees2020-05-131-0/+8
| | |
* | | Merge pull request #38611 from ThakeeNathees/shadow-var-warning-bug-fixRémi Verschelde2020-05-141-11/+5
|\ \ \ | | | | | | | | shadowed var warning in nested block bug fix
| * | | shadowed var warning in nested block bug fixThakee Nathees2020-05-101-11/+5
| |/ / | | | | | | | | | Fix: #38552
* | | Merge pull request #38609 from ↵Rémi Verschelde2020-05-131-0/+2
|\ \ \ | | | | | | | | | | | | | | | | ThakeeNathees/range-crash-with-non-numeric-const-fix range() with non-numeric const argument crash fix
| * | | range() with non-numeric const argument crash fixThakee Nathees2020-05-101-0/+2
| |/ /
* | | Merge pull request #38708 from ThakeeNathees/init-assign-type-parser-bug-fixRémi Verschelde2020-05-131-0/+1
|\ \ \ | | | | | | | | regression: var declaration type info parser bug fix
| * | | regression: var declaration type info parser bug fixThakee Nathees2020-05-131-0/+1
| | | |
* | | | regression: static func can't access const fixThakee Nathees2020-05-131-3/+6
|/ / /
* | | Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde2020-05-101-72/+216
| | | | | | | | | | | | Part of #33027.
* | | Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde2020-05-101-27/+54
| | | | | | | | | | | | | | | | | | | | | Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
* | | Merge pull request #37020 from aaronfranke/rangeRémi Verschelde2020-05-101-8/+8
|\ \ \ | | | | | | | | Allow using integer vectors for iteration and make range() use them
| * | | Change get_completion_identifier_is_function to return a boolAaron Franke2020-05-091-1/+1
| | | | | | | | | | | | | | | | A minor bugfix
| * | | Allow using integer vectors for iteration and make range() use themAaron Franke2020-05-091-7/+7
| | | |
* | | | more clearer unexpected statement end error messagesThakee Nathees2020-05-101-12/+22
| |/ / |/| |
* | | Merge pull request #37598 from ThakeeNathees/GDScript-type-resolve-bug-fixRémi Verschelde2020-05-091-0/+4
|\ \ \ | | | | | | | | GDScript class var type resolve bug fixed