From 34add7d7bfb4625021dff1f9e7841293b83e1558 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Fri, 1 Jan 2010 17:11:48 -0500 Subject: [PATCH] adding consistent highlighting to variable assignment, whether functions or values --- examples/code.coffee | 4 ++-- .../Syntaxes/CoffeeScript.tmLanguage | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/examples/code.coffee b/examples/code.coffee index 7c327ad3..0b65aa20 100644 --- a/examples/code.coffee +++ b/examples/code.coffee @@ -27,9 +27,9 @@ spaced_out_multiline_object: { } # Arrays: -stooges : [{moe: 45}, {curly: 43}, {larry: 46}] +stooges: [{moe: 45}, {curly: 43}, {larry: 46}] -exponents : [(x => x), (x => x * x), (x => x * x * x)] +exponents: [(x => x), (x => x * x), (x => x * x * x)] empty: [] diff --git a/lib/coffee_script/CoffeeScript.tmbundle/Syntaxes/CoffeeScript.tmLanguage b/lib/coffee_script/CoffeeScript.tmbundle/Syntaxes/CoffeeScript.tmLanguage index 5d35aa10..2ff3cd30 100644 --- a/lib/coffee_script/CoffeeScript.tmbundle/Syntaxes/CoffeeScript.tmLanguage +++ b/lib/coffee_script/CoffeeScript.tmbundle/Syntaxes/CoffeeScript.tmLanguage @@ -208,6 +208,25 @@ name keyword.control.coffee + + match + \b([a-zA-Z$_]\w*)(\:)\s + name + variable.assignment.coffee + captures + + 1 + + name + entity.name.function.coffee + + 2 + + name + keyword.operator.coffee + + + match \b(true|on|yes)\b