Commit Graph

14 Commits

Author SHA1 Message Date
Allan Odgaard
cb098b4d80 Update testing system for scope framework 2013-07-26 13:53:58 +02:00
Joachim Mårtensson
eaf2d97141 Using ‘$’ in scope selector will anchor to end of content scope
The content scope is the portion of the scope created while parsing the document content, unlike scope attributes, document, project, SCM, and dynamic scopes (appended to the content scope).
2013-03-25 10:22:27 +01:00
Allan Odgaard
d16f3bcc1e Use per-line indent patterns when estimating indent
This solves the problem where we need to estimate the current line’s indent, but the lines above it is a multi-line block comment. Previously we would fetch indent patterns based on the current scope, then find the first line above caret, for which the patterns can be used to estimate the indent. The problem is that the commented lines without comment markers would be treated as code, and used for the indent.

With the new approach, we can set different patterns for ‘comment.block’ (the C bundle already does this), which basically ignore all the lines, which will cause TextMate to use the code above the comment to estimate indent.

This commit closes textmate/c.tmbundle#3 and also closes textmate/php.tmbundle#24.
2013-03-13 12:38:12 +01:00
Allan Odgaard
b139ac5097 Change push_back → emplace_back (C++11)
This is mainly motivated by readability, so I only did a few select replacements.
2013-02-08 11:20:35 +01:00
Allan Odgaard
bcbd055137 Use exp2(x) instead of pow(2, x) 2013-02-08 11:20:35 +01:00
Allan Odgaard
e75e7ec8e5 Change text::format → std::to_string (C++11) 2013-02-08 11:20:34 +01:00
Allan Odgaard
cbe91ff831 Assume compiler support for explicit keyword
Since we require a fairly recent clang for other features, there is no reason to test for this one.
2012-08-29 14:27:35 +02:00
Jacob Bandes-Storch
0fcb4c2d2c Use libc++: don’t rely on implicit conversions 2012-08-28 20:10:55 +02:00
Jacob Bandes-Storch
e3aa997b06 Use libc++: replace std::tr1 with std 2012-08-28 13:30:20 +02:00
Allan Odgaard
4ca897816d Remove TS_WARN since we do have tests
Sort of a fixup! to 2c6a847 (which added child selectors).
2012-08-19 15:53:43 +02:00
Joachim Mårtensson
b21fbd897e Fix ^, previously it failed immediatly if last rule in scope selector, wasn't tested against last scope part. Fixed by giving ^ additional chances 2012-08-10 18:44:16 +02:00
Joachim Mårtensson
49320f4efb Fix bug with > in scope selector. There was an implicit > after path 2012-08-10 18:44:16 +02:00
Joachim Mårtensson
2c6a8471f9 Add support for ^ $ and > in scope selectors 2012-08-10 18:44:16 +02:00
Allan Odgaard
9894969e67 Initial commit 2012-08-09 16:25:56 +02:00