Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 2.0KB

1234567891011121314151617181920212223242526
  1. ESQuery is a library for querying the AST output by Esprima for patterns of syntax using a CSS style selector system. Check out the demo:
  2. [demo](https://estools.github.io/esquery/)
  3. The following selectors are supported:
  4. * AST node type: `ForStatement`
  5. * [wildcard](http://dev.w3.org/csswg/selectors4/#universal-selector): `*`
  6. * [attribute existence](http://dev.w3.org/csswg/selectors4/#attribute-selectors): `[attr]`
  7. * [attribute value](http://dev.w3.org/csswg/selectors4/#attribute-selectors): `[attr="foo"]` or `[attr=123]`
  8. * attribute regex: `[attr=/foo.*/]`
  9. * attribute conditons: `[attr!="foo"]`, `[attr>2]`, `[attr<3]`, `[attr>=2]`, or `[attr<=3]`
  10. * nested attribute: `[attr.level2="foo"]`
  11. * field: `FunctionDeclaration > Identifier.id`
  12. * [First](http://dev.w3.org/csswg/selectors4/#the-first-child-pseudo) or [last](http://dev.w3.org/csswg/selectors4/#the-last-child-pseudo) child: `:first-child` or `:last-child`
  13. * [nth-child](http://dev.w3.org/csswg/selectors4/#the-nth-child-pseudo) (no ax+b support): `:nth-child(2)`
  14. * [nth-last-child](http://dev.w3.org/csswg/selectors4/#the-nth-last-child-pseudo) (no ax+b support): `:nth-last-child(1)`
  15. * [descendant](http://dev.w3.org/csswg/selectors4/#descendant-combinators): `ancestor descendant`
  16. * [child](http://dev.w3.org/csswg/selectors4/#child-combinators): `parent > child`
  17. * [following sibling](http://dev.w3.org/csswg/selectors4/#general-sibling-combinators): `node ~ sibling`
  18. * [adjacent sibling](http://dev.w3.org/csswg/selectors4/#adjacent-sibling-combinators): `node + adjacent`
  19. * [negation](http://dev.w3.org/csswg/selectors4/#negation-pseudo): `:not(ForStatement)`
  20. * [matches-any](http://dev.w3.org/csswg/selectors4/#matches): `:matches([attr] > :first-child, :last-child)`
  21. * [subject indicator](http://dev.w3.org/csswg/selectors4/#subject): `!IfStatement > [name="foo"]`
  22. * class of AST node: `:statement`, `:expression`, `:declaration`, `:function`, or `:pattern`
  23. [![Build Status](https://travis-ci.org/estools/esquery.png?branch=master)](https://travis-ci.org/estools/esquery)