Refine lambda expression matching

r9814 added a rule to match lambda expressions, but had two issues:

 1. The last argument in the lambda expression was not assigned to
    variable.parameter.function.python. This is corrected by
    adding ":" to the punctuation.separator.parameters.python group.
 2. If the lambda expression used an assignment it led to a run-away
    grammar. e.g. in "lambda foo=bar:" the "foo=bar" would be
    matched by #keyword_arguments, but #keyword_arguments does not
    allow the ":" to end the match. This is corrected by adding
    ":" to punctuation.separator.parameters.python endCaptures.
    (This is not 100% correct, since ':' is not valid in a normal
    function definition, but the alternative is to cut-and-paste
    keyword_arguments into meta.function.inline.python.)

Changed:
U   trunk/Bundles/Python.tmbundle/Syntaxes/Python.tmLanguage

_______________________________________________
textmate-dev mailing list
[email protected]
http://lists.macromates.com/listinfo/textmate-dev

Reply via email to