aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Syntax.md
AgeCommit message (Collapse)AuthorFilesLines
2021-04-06docs: document bool to_int and to_string methodsSimon Ser1-0/+8
This documents the bool methods to_int and to_string implemented in [1]. [1]: https://github.com/mesonbuild/meson/blob/a9e9b7c7501a3c8a5984a93879d1f309bf8c72aa/mesonbuild/interpreterbase.py#L1109
2021-03-10Some documentation language adjustments & improved error messagesLaurin-Luis Lehning1-1/+9
2021-03-10Yet another documentation updateLaurin-Luis Lehning1-0/+3
2021-03-10Add syntax documentation with tentative version targetLaurin-Luis Lehning1-0/+16
2021-03-09Add str.replace() methodTristan Partin1-0/+11
2021-01-30Rewrap long text lines in docs. [skip ci]Jussi Pakkanen1-18/+21
2021-01-23docs: Fix typo in Syntax.md [skip ci]Evgeny Ermakov1-1/+1
2020-10-22Syntax.md: Fix variable used in substring exampleDanilo Spinella1-2/+2
2020-09-21docs: Clarify what literal strings mean [skip ci]Nirbheek Chauhan1-2/+3
Someone on IRC was confused by this paragraph.
2020-07-20string: add substring methodStéphane Cerveau1-0/+20
This method aims to offer a simple way to 'substring' an existing string with start and end values.
2020-06-28syntax.md: document version_compare ambiguities [skip ci]Michael Hirsch, Ph.D1-0/+8
2020-06-28syntax.md: correct markdown heading syntax [skip ci]Michael Hirsch, Ph.D1-46/+33
2020-06-24docs: Document string path building with examplesNirbheek Chauhan1-3/+22
Also document that line continuation didn't work before 0.50. 90c9b868b20b11bb089fc5e0c634d5ed76fea0cb fixed it.
2020-05-01Document formal Meson grammar [skip ci]Flow-It1-0/+70
* WIP: Document formal Meson grammar * Various little fixes [skip ci] 1) Add missing logical_not_expr 2) 'in' and 'not in' are valid relational operators at least for dicts 3) dictionary keys can be expressions, but kwarg names cannot 4) typo logical_end_expression -> logical_and_expression 5) Make jump statements only allowed inside an iteration statement * Rework EBNF style [skip ci] As there is no good order for the productions, just go alphabetically. The EBNF style was changed to match the one the Python lark project uses, that is colons for productions and terminals enclosed in double quotes. * Add missing production for unary operators [skip ci] * Add production for multiline strings [skip ci] * Properly define terminal symbols [skip ci] Depending on the EBNF flavor, regex can be used to describe the terminal symbols. Lark allows this, and as it was mentioned as a possible user of this grammar, let's follow its flavor here. Most regexes used are easily human-readable, and we can always add comments to more complicated ones. * Small changes to which expressions can be used where [skip ci] Let the grammar be very general. The type system then has to check, that the used expression really evaluates to the correct type. Even if we know today that assignment expressions always evaluate to None (and can therefore only be used as a toplevel expression in an expression statement), this needn't be the case forever. So this way, the grammar stays stable even if such changes were made. * Rework function argument list production [skip ci] * Be more verbose for production names [skip ci] Rename expr -> expression, stmt -> statement, op -> operator, program -> build_definition. Also adjust some list productions. * Add paragraph about syntax stability promises [skip ci]
2019-12-04dict: Fully evaluate keysXavier Claessens1-2/+10
The only restriction is keys must be string after evaluation. This fix various inconsistencies.
2019-09-03docs/syntax: fix typo in dict example [skip ci]Nirbheek Chauhan1-1/+1
2019-09-03docs/syntax: Document that dicts are unordered [skip ci]Nirbheek Chauhan1-1/+1
2019-07-26note that integers have .to_string() method [skip ci]Michael Hirsch, Ph.D1-0/+7
2019-05-22join_paths => / [skip ci]Michael Hirsch, Ph.D1-3/+3
2019-04-28consistent invalid escape sequence behaviourJon Turney1-0/+3
* docs: document unrecognized escape sequence behaviour [skip ci] Document that unrecognized escape sequence behaviour is like python, not C. * Don't try to decode invalid hex escape sequences Don't try to decode escape sequences which should contain a sequence of hex digits, but don't, throwing a python exception. These will treated literally instead. * Extend test case to cover invalid escape sequences
2018-12-19docs: Add warning about not using join_paths() with build targets [skip ci]Dylan Baker1-0/+8
This comes up now and again when people try do do something like: meson.build: ```meson my_sources = ['foo.c'] subdir('subdir') executable('foo', my_sources) ``` subdir/meson.build: ```meson my_sources += ['bar.c'] ```
2018-12-04Can specify keyword arguments with a dict.Jussi Pakkanen1-3/+39
2018-10-04Add documentation and release notes for 'in', 'continue' and 'break'Xavier Claessens1-0/+43
2018-09-20syntax guide: move logical ops section beside if statement [skip ci]Bruce Richardson1-23/+24
The "if" statement only covers a small set of the possible ways in which conditionals can be written, since it leaves the use of "and", "or" and "not" to the "Logical Operations" section. However, this is likely to be of interest to those reading about "if" statments, so move the "logical operations" section up to immediately follow it. This change also puts in the use of the "!=" operator in the example to widen the variety of combinations shown.
2018-06-06docs: Fix dictionary syntax [skip ci]Yudi Matsuzake1-1/+1
2018-05-23Document octal and binary integer literals in syntax.Filipe Brandenburger1-0/+7
Also add a release notes snippet for it.
2018-05-22dict: add since annotationsMathieu Duponchelle1-1/+4
2018-05-20dict: Document, add release snippetMathieu Duponchelle1-6/+58
2018-04-21Add more tests for multi-line strings and update docsNirbheek Chauhan1-1/+2
2018-04-17Complete python escape sequences aware stringsTim 'mithro' Ansell1-2/+18
Fixes #3169
2018-02-05Add support for hex int literals.Jussi Pakkanen1-0/+6
2017-11-19Fix literal backslash syntaxLucas Werkmeister1-1/+1
In CommonMark, there are no backslash escapes in code spans, so only two backslashes in the source document are necessary to produce two backslashes in the output document.
2017-11-11Cleanupping.Jussi Pakkanen1-22/+69
2017-10-23Fix invalid example in Syntax.mdJonas Platte1-1/+1
2017-07-31doc: describe joining strings using the + symbolBruce Richardson1-0/+10
2017-07-24Fix wording about array immutabilityNirbheek Chauhan1-1/+1
2017-07-24Clarify array immutability and document indexingNirbheek Chauhan1-3/+21
2017-06-07Improve user-defined function wording & link to FAQTim Hutt1-1/+1
2017-06-07Document that user-defined functions and methods are unsupportedTim1-0/+5
Fixes #1870
2017-06-03Add a note about multi-line statements by ending the line with \Tim1-2/+1
2017-05-11Update Syntax.mdliberforce1-1/+1
Fix variable name
2017-04-26docs: Import the website and wiki and build with hotdocThibault Saunier1-0/+320
This allows us to more easily have the documentation in sync with the source code as people will have to document new features etc right at the time where they implement it.