Skip to content
#

ast

A grammar describes the syntax of a programming language, and might be defined in Backus-Naur form (BNF). A lexer performs lexical analysis, turning text into tokens. A parser takes tokens and builds a data structure like an abstract syntax tree (AST). The parser is concerned with context: does the sequence of tokens fit the grammar? A compiler is a combined lexer and parser, built for a specific grammar.

Here are 953 public repositories matching this topic...

prettier
postcss
StephenEsser
StephenEsser commented Oct 25, 2019

Issue

When using postcss v7.0.20 the webpack compilation fails with the following stack trace.

✖ 「wdm」: TypeError: Cannot read property 'value' of undefined
    at /Users/username/workspaces/terra/terra-core/9.css:220:3
    at new Quoted (/Users/username/workspaces/terra/terra-core/node_modules/postcss-values-parser/lib/nodes/Quoted.js:19:28)
    at cloneNode (/Users/username/works
GuyLewin
GuyLewin commented Oct 15, 2019

Multiple different Javascript snippets can result in a LineComment node:

// type1
<!-- type2
--> type3

From current Esprima's output there's no way to know which one of these 'styles' was used as a comment.

Since this is specific to LineComment nodes, it's possible to split the type of node from 'LineComment' into 3 node types (one for each style). But I assume that wo

alexanderdickson
alexanderdickson commented Nov 25, 2019

Typing print() in the jscodeshift transformer triggers browser print dialog

To Reproduce
Steps to reproduce the behavior:

  1. Specify to use jscodeshift
  2. Type print() in bottom left corner
  3. See the bug

Expected behavior
Shouldn't do that

Browser (please complete the following information):

  • OS: OS X
  • Browser Chrome
  • Version 78.0.3904.108

**astexplorer

lukenconsulting
lukenconsulting commented May 4, 2020
Overview of the issue

When I try to include links in the documentation they do not appears as expected.

Operating System, Node.js, npm, compodoc version(s)

node 12.16.1
npm 6.13.4
compodoc 1.1.11 (installed globally)

Angular configuration, a package.json file in the root folder
Compodoc installed globally or locally ?

globally

MTRNord
MTRNord commented Apr 25, 2018

Hi I want to check if the prevoius char is a :. The exact example code I have is this:

Prefix: !

I want basicly to be able to check based on if the previous char is a : the ! should get a string and later reuse the look back logic to check if I am inside an array which is defined like in yaml meaning to make sure the last 2 lines of the following example don't get into the ar

theofidry
theofidry commented Nov 26, 2019

Basically we need to choose between:

class X {

  private $foo;

  public function __construct(string $foo) {
    $this->foo = $foo;
  }

  public function getFoo(): string {
    return $this->foo;
  }
}

or:

class X {

  /**
   * @var string
   */
  private $foo;

  public function __construct(string $foo) {
    $this->foo = $foo;
  }

  public f
RFC
viboes
viboes commented Sep 28, 2019

As for Display the special operations generated by the compiler #224 discussion, the documentation will improve if we had a section describing the transformation of each featre and his limitations.

In particular for the special operation, to explain that only the operations that are really generated would appear in the transformation. This is due to the fact that the tool s based on the AST.

You can’t perform that action at this time.