<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;"><span><div><div><div><br></div><div>The way to do this is by having a scope that matches the whole method</div><div>"head" (`at: anIndex put: aValue`, say) and add that to the symbol list</div><div>with a transformation removing the parameters.</div><div><br></div><div>This is not generally a trivial task, but it can be done if you can</div><div>either find a simpler matcher (usually a match instead of a begin/end</div><div>pair) or a clean separator between a method's head and body (the "hard"</div><div>way), or if you're fine without having separate scopes for method head,</div><div>body and (complete) definition.</div><div><br></div><div>In your example, if you can do without the `'#language_elements`</div><div>inclusion you could try a matcher like</div><div>    ^([-+])\s+((\w+:?)(\s*\w+)?)+</div><div>to match the whole line at once and assign some scope to the 0 capture.</div><div><br></div><div>I'll have to document the "hard" way properly some day, but the gist is</div><div>you can match a construct of the form `X stuff Y more Z` with a pair</div><div>of begin/end matchers for X and Z and then including nested begin/end</div><div>matchers for X to Y and Y to Z using lots of lookaheads and -behinds.</div><div><br></div><div>An example is included in my Maude grammar[1] as the `#operator` rule</div><div>with a matcher for the whole operator construct and nested matchers for</div><div>its range, domain and definition.</div><div><br></div><div>Hope that helps anyway?</div><div><br></div></div></div></span></blockquote><div><br></div><div>1: yeah language elements is left over from a previous attempt at something else that I need to return to. Not needed here. Should have clipped.</div><div><br></div><div>I've managed to do... add to symbol list or highlight syntax correctly but not both at once.</div><div><br></div><div>Perhaps there is an answer above and I missed it, but is there a way to:</div><div><br></div><div>match entire thing and transform symbol <-- yes because i have done that</div><div>but also have highlighting so that</div><div><br></div><div>at: anIndex put: aValue</div><div><br></div><div>has at: and put: marked as 'function' </div><div>& </div><div>anIndex and aValue marked as 'parameters'</div><div><br></div><div>AND</div><div><br></div><div>then remove at: & put: from the symbol list?</div><div><br></div><div>I can do highlighting. I can do symbols. I can't figure out how to combine the 2 together.</div><div>  </div><div><br>
                </div>