Age | Commit message (Collapse) | Author |
|
|
|
Due to the ordering of the checks, assert and async were not highlighted
in the editor, even though they were in the list of keywords.
Differential Revision: http://developer.blender.org/D15483
|
|
|
|
|
|
Python 3.10 has added "soft keywords" [0] to their list of identifiers.
This patch adds these soft keywords to the list of builtin functions
that the text editor searches for when highlighting Python code.
The only soft keywords that Python 3.10 current has are: `match`,
`case`, and `_`, but more will likely be added in future versions.
Currently, the `_` soft keyword is ignored from highlighting. It is a
wildcard matching pattern when used with `case` (similar to `default`
for `switch`es in C/C++), but `_` is far more often used in other
contexts where highlighting the `_` might seem strange. For example,
ignoring elements when unpacking tuples (`_, g, _, a = color`).
This patch also updates the commented Python code for creating the list
of keywords, for convenience.
Before:
{F13012878}
After:
{F13012880}
Example from PEP-636 [1]
Note: These soft keywords are only reserved under specific contexts.
However, in order for the text editor to know when the keywords are used
in the appropriate contexts, the text editor would need a full-blown
Python grammar [2] parser. So, for now, these keywords are simply added
in along with the other keywords in order to highlight them in the text
editor.
[0]: https://docs.python.org/3/reference/lexical_analysis.html#soft-keywords
[1]: https://peps.python.org/pep-0636/#matching-specific-values
[2]: https://docs.python.org/3/reference/grammar.html
Ref D14707
|
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
|
|
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/space_text` module.
No functional changes.
|
|
|
|
In some cases moved the checks into asserts,
to ensure changes in the future don't cause
the checks to become necessary again.
|
|
|
|
Less common notation for numbers wasn't highlighted eg:
0b0, 0o0, 0x0, 1.0e0, 1.0E-1, 100_000j
|
|
|
|
Workaround limitations of formatting code by putting longest names first.
Differential Revision: https://developer.blender.org/D5613
|
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
|
|
Use doxy references to function and enums,
also correct some names which became out of sync.
|
|
This is obviously not a perfect solution. However, to do proper
highlighting a more advanced Python parser would be necessary.
I think this patch implements a good heuristic to differentiate
between the cases when `@` is used for a decorator vs for
multiplication.
When `@` is directly followed by an identifier, it is interpreted
as decorated. Otherwise not.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4495
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
|
|
Differential Revision: https://developer.blender.org/D3732
|
|
|
|
paste errors), also remove BKE_script.h
|
|
where possible.
also found unintentionally defined enum/struct variables that where only meant to be defining the type.
|
|
|
|
|
|
|
|
fills in the line with a formatting value.
this fixes a mistake in OSL lexer which would comment all lines after '//'
|
|
|
|
in python.
|
|
|
|
comment for // in OSL)
|
|
asserts if the continuation values are wrong (which can happen with buffer overflows on formatting).
|
|
decorators and decorators where being skipped.
|
|
|
|
STR_LITERAL_STARTSWITH() macro that gets the size from sizeof().
|
|
|
|
|
|
text_format_py.c
|
|
each has their own source file,
Since we will likely have OSL formatting added soon.
|