| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
* Add (all?) Matlab built-ins
See also https://de.mathworks.com/help/matlab/referencelist.html
* Adjust pytest goldens
|
|
|
|
|
|
|
|
|
| |
* Clarify recognition of "command form" by MATLAB parser.
Expand a bit the explanation; remove an unnecessary non-capturing group,
replace \s+ by \s at the end (we just need to check for the presence of
a space).
* MATLAB: Correctly parse 1./x as (1)(./)(x).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* WIP: Add failing test for a matlab class with properties.
* Add some missing keywords
* Add leading \s* matchers to things above the command form regex, as it tends to swallow keywords otherwise.
* Add support for the special 'properties' block syntax.
* Fix apparent infinite loop when given garbage input.
* Use includes to clean up some of my copypasta.
* Fix negative lookahead when there's more than one space between operators.
* Use Whitespace not Text for spaces; combine adjacent whitespace.
* Add support for declarative property constraints.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pyupgrade is a tool to automatically upgrade syntax for newer versions
of the Python language.
The project has been Python 3 only since
35544e2fc6eed0ce4a27ec7285aac71ff0ddc473, allowing for several cleanups:
- Remove unnecessary "-*- coding: utf-8 -*-" cookie. Python 3 reads all
source files as utf-8 by default.
- Replace IOError/EnvironmentError with OSError. Python 3 unified these
exceptions. The old names are aliases only.
- Use the Python 3 shorter super() syntax.
- Remove "utf8" argument form encode/decode. In Python 3, this value is
the default.
- Remove "r" from open() calls. In Python 3, this value is the default.
- Remove u prefix from Unicode strings. In Python 3, all strings are
Unicode.
- Replace io.open() with builtin open(). In Python 3, these functions
are functionally equivalent.
Co-authored-by: Matthäus G. Chajdas <Anteru@users.noreply.github.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add analyze_text to make make check happy.
This also fixes a few small bugs:
* Slash uses *.sla as the file ending, not *.sl
* IDL has endelse, not elseelse
* Improve various analyse_text methods.
* Improve various analyse_text methods.
* Make Perl less confident in presence of :=.
* Improve brainfuck check to not parse the whole input.
* Improve Unicon by matching \self, /self
* Fix Ezhil not matching against the input text
* Simplify Modula2::analyse_text.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add explicit line continuation for Matlab session
Matlab lines can be explicitly continued with the ... syntax at the end
of a line. In the Session lexer, this requires continuing to the next
line to add more text. Otherwise, the next line is marked as output.
* The ellipses in Matlab should be a Keyword
The built-in Matlab syntax highlighter highlights ... with the same
formatting as a keyword. Everything after that on the line should be a
comment.
* Update Matlab functions and keywords from R2018a
* Fix many spaces in assignment formatted as string
In command mode, MATLAB allows mutiple space separated arguments to a
function which are interpreted as char arrays, and are formatted as
Strings. This check was also catching cases where there were multiple
spaces following an assignment or comparison operation and formatting
the rest of the line as a string. Now, if an = or operator is found, the
commandargs state is popped and control returns to the root state.
* Add tests for MATLAB formatting
|
| |
|
|\
| |
| | |
More fixes to MATLAB lexer.
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... so don't highlight them as keywords in that position.
Example MATLAB session showcasing this "feature":
>> x.for = 42
x =
struct with fields:
for: 42
>> x
x =
struct with fields:
for: 42
>> x.for
ans =
42
|
|
|
|
|
|
| |
MATLAB treats a bare word followed by arguments such as `foo bar baz` as
the function call `foo('bar', 'baz')`. As such, treat everything that
follows the bare word as a string.
|
|
|
|
|
|
|
| |
- Detect `.m` files starting with a function definition as MATLAB, not
ObjC (#1149).
- Require word boundaries in regexes matching numbers and floats, to
avoid mishighlighting `load 123file` as starting with a number.
|
|
|
|
| |
#795)
|
| |
|
|
|
|
| |
Also, raise on warnings from Pygments only.
|
| |
|
|
This introduces support for some missing features to the Handlebars lexer:
Partials and path segments. Partials mostly appeared to work before, but the
`>` in `{{> ... }}` would appear as a syntax error, as could other
components of the partial. This change introduces support for:
* Standard partials: `{{> partialName}}`
* Partials with parameters: `{{> partialName varname="value"}}`
* Ddynamic partials: `{{> (partialFunc)}}`
* Ddynamic partials with lookups: `{{> (lookup ../path "partialName")}}`
* Partial blocks: `{{> @partial-block}}`
* Inline partials: `{{#*inline}}..{{/inline}}`
It also introduces support for path segments, which can reference content in
the current context or in a parent context. For instance, `this.name`,
`this/name`, `./name`, `../name`, `this/name`, etc. These are all now tracked
as variables.
|