Module Language.JavaScript.Show

A library to represent JavaScript programs.

Author: Michael Hanus

Version: November 2020

Summary of exported operations:

showJSExp :: JSExp -> String  Deterministic 
Shows a JavaScript expression as a string in JavaScript syntax.
showJSStat :: Int -> JSStat -> String  Deterministic 
Shows a JavaScript statement as a string in JavaScript syntax with indenting.
showJSFDecl :: JSFDecl -> String  Deterministic 
Shows a JavaScript function declaration as a string in JavaScript syntax.

Exported operations:

showJSExp :: JSExp -> String  Deterministic 

Shows a JavaScript expression as a string in JavaScript syntax.

showJSStat :: Int -> JSStat -> String  Deterministic 

Shows a JavaScript statement as a string in JavaScript syntax with indenting.

Example call:
(showJSStat i jstat)
Parameters:
  • i : number of spaces to indent this statement
  • jstat : the JavaScript statement to print

showJSFDecl :: JSFDecl -> String  Deterministic 

Shows a JavaScript function declaration as a string in JavaScript syntax.