Граф коммитов

5 Коммитов

Автор SHA1 Сообщение Дата
Nicholas Nethercote 0f7f399e93 Bug 1426269 - Change the `slashslash` filter in preprocessor.py. r=glandium
This commit does the following.

- Renames `slashslash` as `dumbComments`. As a result, it now comes before
  `emptyLines` in alphabetical ordering, which means that if you apply both
  `dumbComments` and `emptyLines`, lines that contain only comments will be
  fully removed.

  (I contemplated changing the filter ordering to match the order specified,
  rather than using alphabetical ordering, but that was more invasive and not
  obviously better.)

- Changes `dumbComments` so it only applies if the comment is at the start of
  the line (with optional leading whitespace). This is so it can be used with
  prefs files, which contain lines like `pref("foo", "https://mozilla.org");`
  where the `//` must not be treated as a comment.

Note that `slashslash` wasn't being used anywhere.

Depends on D88240

Differential Revision: https://phabricator.services.mozilla.com/D88242
2020-09-08 23:04:51 +00:00
Nicholas Nethercote 1aa3d23435 Bug 1426269 - Remove the `spaces` filter from preprocessor.py. r=glandium
It's not used, probably because it's pretty strange and hard to imagine using
safely. (Stripping leading and trailing space could be useful, but collapsing
sequences of spaces? Hmm.)

Differential Revision: https://phabricator.services.mozilla.com/D88240
2020-09-08 06:54:04 +00:00
Nicholas Nethercote 4e52c0f072 Bug 1573080 - Fix some incorrect preprocessor.py docs. r=glandium
As shown by python/mozbuild/mozbuild/test/test_preprocessor.py, whitespace is
allowed within expressions, and chained #if/#elif/#else sequences work as you'd
expect.

Differential Revision: https://phabricator.services.mozilla.com/D41494

--HG--
extra : moz-landing-system : lando
2019-08-13 22:20:04 +00:00
Mike Hommey a470038314 Bug 935305 - Move preprocessor to mozbuild.action. r=gps
--HG--
rename : config/Preprocessor.py => python/mozbuild/mozbuild/preprocessor.py
rename : config/tests/unit-Expression.py => python/mozbuild/mozbuild/test/test_expression.py
rename : config/tests/unit-LineEndings.py => python/mozbuild/mozbuild/test/test_line_endings.py
rename : config/tests/unit-Preprocessor.py => python/mozbuild/mozbuild/test/test_preprocessor.py
2013-11-09 10:35:44 +09:00
Gregory Szorc 1e4f6fcad3 NO BUG - Build docs for text preprocessor and jar manifests
DONTBUILD (NPOTB)
2013-10-07 23:47:08 +02:00