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 929 public repositories matching this topic...

prettier
lydell
lydell commented Mar 22, 2020

Now that Prettier 2.0 has been released with its improved CLI, I think we should add a section do the docs showing a recommended example setup.

  1. Recommend using an editor extension that lets you run Prettier from your editor. Link to popular extensions. Maybe add some tips on how to configure for example prettier-vscode.
  2. Recommend adding an empty ({}) .prettierrc.json to signify to edit
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
wilsonzlin
wilsonzlin commented Nov 3, 2019

The ForInStatement and ForOfStatement interfaces can also have VariableDeclaration as the value for the left property, as specified by the spec at https://www.ecma-international.org/ecma-262/10.0/index.html#sec-for-in-and-for-of-statements and demonstrated by running the following code:

esprima.parseScript('for (const a in b) {}');
esprima.parseScript('for (const a of b)
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.