Coder Social home page Coder Social logo

urish / tsquery-playground Goto Github PK

View Code? Open in Web Editor NEW
43.0 4.0 15.0 1.01 MB

Playground for TSQuery

Home Page: https://tsquery-playground.web.app

License: MIT License

JavaScript 12.32% TypeScript 64.54% HTML 15.97% CSS 2.52% SCSS 4.65%
typescript ast abstract-syntax-tree playground angular tsquery tsquery-playground

tsquery-playground's Introduction

TSQuery Playground

Build Status

๐Ÿ” Live Demo

Development server

Run yarn start for a dev server, then navigate to http://localhost:4200/.

License

Copyright (C) 2018-2020, Uri Shaked. The code in this repo is published under the MIT license.

tsquery-playground's People

Contributors

dependabot[bot] avatar fleker avatar schuchard avatar urish avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tsquery-playground's Issues

Add a LICENSE

I'd like to request the addition of a LICENSE file so we can have a better understanding of how the code can be used.

Cannot get direct descendants of Block when preceeded by Constructor or FunctionDeclaration

The Playground seems to think that there is an additional unidentifiable node sitting between Block and its children when preceeded by Constructor or FunctionDeclaration

Code:

function A() {
  this.a = 1;
}

class B {
  constructor() {
    this.a = 1;
  }
}

AST Queries

The following will not work:

ClassDeclaration > Constructor > Block > ExpressionStatement
FunctionDeclaration > Block > ExpressionStatement

Where, these do work:

ClassDeclaration > Constructor > Block > * > ExpressionStatement
ClassDeclaration > Constructor > Block ExpressionStatement
FunctionDeclaration > Block > * > ExpressionStatement
FunctionDeclaration > Block ExpressionStatement

ngx-codemirror how to add id to functiona block to identify the chnages

Hi,

I have requirement where my input is json and json contains importts and body properties using which i build function, Since codemirror accepts string, what i get back from codemirror is also string, now how to identify which function chnaged and add update that particular json value

Sibling matching does not work

In the playground, I would expect a query like Identifier[name='n'] ~ AnyKeyword to match the n:any section of the code. It does not.

It looks like it's because your runQuery method does not use the visitAllChildren: true option.

I'll file a pull request once issue #1 is resolved.

Related: phenomnomnominal/tsquery#29

Can't scroll on the playground

It appears that it's impossible to scroll when there's a large piece of code.

Neither on the code nor the query result.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.