JavaScript Language Add-on - Feature Summary

by Avatar Bill Henning (Actipro)
Tuesday, May 28, 2013 at 10:34am

PostBannerSyntaxEditorDevNotes

In our last post, we revealed that a new advanced implementation of the JavaScript language is being added to the Web Languages Add-on in the 2013.2 version.

JavaScript

In this post we'll look at which features will be part of the language's first release.

Syntax Highlighting

As with all our other syntax languages, a lexer tokenizes the code and allows for colorization of items such as keywords, comments, strings, etc.  This makes code much easier to read.

Parsing

A full parser that conforms to the ECMAScript 5.1 standard is included.  The parser runs in a worker thread, and even handles things such as implicit semi-colon insertion.

AST Generation

The parser outputs a complete abstract syntax tree (AST) of the document.  This AST is stored with the document and can be traversed to view the JavaScript code structure.

Syntax Error Reporting

Errors in syntax are returned by the parser and can be displayed in error lists.  In addition, squiggle lines are rendered under the errors and mouse hovers over the squiggles reveals the error description.

Code Outlining

All JavaScript functions are code outlined so that they may be collapsed (folded).  The outlining margin helps the end user by providing some visual structure to the code.

Smart Indent

Pressing Enter at the end of a line indents properly on the next line.

Text Formatting

A text formatter is included that beautifies JavaScript code.

Code Block Selection

Use Ctrl+Num+ and Ctrl+Num- to expand and collapse the text selection over the ancestor statement/block/function hierarchy.  This sort of functionality is described in detail in this post.

Delimiter Auto-Complete

A new feature (being added in 2013.2 with support for all languages) allows for delimiter auto-complete.  For example, this means that when you type a ( character, the end ) character is inserted immediately after the caret for you.

Summary

The advanced JavaScript language will be added to the Web Languages Add-on in the 2013.2 version of SyntaxEditor!

TaskDownload TaskLiveDemo TaskBuyNow

Actipro's WPF Controls

Over 100 UI controls for building beautiful Windows Presentation Foundation desktop apps.

Learn More

Over 100 UI controls for building beautiful Windows Presentation Foundation desktop apps.

Includes editors, docking windows, MDI, property grids, charts, tree controls, ribbons, gauges, themes, and much more.

Learn More Download Free Trial

Add Comment

Please log in to a validated account to post comments.