Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Support multi-line regexes #189

Open
nicorikken opened this issue Jul 26, 2016 · 3 comments
Open

Support multi-line regexes #189

nicorikken opened this issue Jul 26, 2016 · 3 comments

Comments

@nicorikken
Copy link

I would like to add support in symbols-view for a language I'm writing Atom support for. It is a C-like DSL named GLM, for GridLAB-D which has a very unfortunate syntax regarding object definition:

object underground_line { //new object definition with type of object
  name Node1toNode2; //name
  id 14632; //id as fallback when name is not defined
  phases ABC;
  from Node1;
  to Node2;
  length 5280;
  configuration An_underground_line_cfg;
}

So the name of the defined object is inside the object definition, rather than on the first line.
Even worse, an id can be specified, which is only valid if name is not defined.

In its most simple form I could just match a name property, or even both name and id.
Ideally however, I would be are of the context, namely being inside of an object definition.

If this issue is marked something like 'invalid' I can totally understand it. However, I'd be glad to hear explanations and possible workarounds, as others might run into similar issues.

@aidistan
Copy link

The answer seems like a "no" (see universal-ctags/ctags#219)

@Thanatermesis
Copy link

I have a similar need, so it is not possible to match multiple lines? I was reasearching during days and I have no way to make it working.

Example: it works somewhere like here: https://regex101.com/r/brZINq/1 but not when I use it in my .ctags file, it only works when there's no mutliple lines like in the "logo" match

@aidistan
Copy link

@Thanatermesis

The regular expression, regexp, defines an extended regular expression (roughly that used by egrep(1)), which is used to locate a single source line containing a tag and may specify tab characters using \t.
-- http://ctags.sourceforge.net/ctags.html

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants