as2js: as2js::anonymous_namespace{lexer.cpp} Namespace Reference

as2js::anonymous_namespace{lexer.cpp} Namespace Reference

The Lexer private functions to handle character types. More...

Classes struct  identifier_characters_t  Define one valid range of characters. More...
  Variables identifier_characters_t g_identifier_characters []  List of characters that are considered to be letters. More...
  size_t const g_identifier_characters_size = sizeof(g_identifier_characters) / sizeof(g_identifier_characters[0])  The size of the character table. More...
  Detailed Description

This unnamed namespace is used by the lexer to define a set of private functions and tables used to handle the characters and tokens.

Variable Documentation
identifier_characters_t as2js::anonymous_namespace{lexer.cpp}::g_identifier_characters[]

The ECMAScript version 5 document defines the letters supported in its identifiers in terms of Unicode characters. This includes many characters that represent either letters or punctuation.

The following table includes ranges (min/max) that include characters that are considered letters in JavaScript code.

The table was generated using the code in:

tests/unicode_characters.cpp

The number of items in the table is defined as g_identifier_characters_size (see below).

Definition at line 90 of file lexer.cpp.

size_t const as2js::anonymous_namespace{lexer.cpp}::g_identifier_characters_size = sizeof(g_identifier_characters) / sizeof(g_identifier_characters[0])

When defining the type of a character, the Lexer uses the character table. This parameter defines the number of entries defined in the table.

Definition at line 670 of file lexer.cpp.

Referenced by as2js::Lexer::char_type().

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.

Syndicate content

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly