Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

537
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda