Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

538
Visualizações
ECMAScript: What does `status` mean in Syntax-Directed Operations?

In https://tc39.es/ecma262/#sec-algorithm-conventions-syntax-directed-operations, There is a description like this

Syntax-directed operations are invoked with a parse node and, optionally, other parameters by using the conventions on steps 1, 3, and 4 in the following algorithm:

  1. Let status be SyntaxDirectedOperation of SomeNonTerminal.
  2. Let someParseNode be the parse of some source text.
  3. Perform SyntaxDirectedOperation of someParseNode.
  4. Perform SyntaxDirectedOperation of someParseNode with argument "value".
  1. What does status in this algorithm mean? It's not used in the algorithm anymore.

  2. What does the algorithm mean? It seems weird.

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

That's just an example, it's not a real algorithm, and it's not necessarily a complete example (hence not using status after the first step). For a real algorithm, look at the section containing actual Syntax-Directed Operations, such as function name inference:

8.4.1 Static Semantics: HasName

...

  1. Let expr be the ParenthesizedExpression that is covered by CoverParenthesizedExpressionAndArrowParameterList.
  2. If IsFunctionDefinition of expr is false, return false.
  3. Return HasName of expr.

The status in the example is like expr in the above, a temporary variable (if you will) for the algorithm. It's just that the example doesn't use status again (it probably should, it would be a better example).

about 4 years ago · Juan Pablo Isaza Relatório

0

What does status in this algorithm mean?

It's just a variable introduced by that step, like in any other "Let x be …".

What does the algorithm mean? It seems weird.

It means nothing. It's an example algorithm in the "algorithm conventions" section explaining how algorithm steps are meant to be understood in the rest of the spec.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda