JS - Lexical Structure

Posted zawjdbb

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了JS - Lexical Structure相关的知识,希望对你有一定的参考价值。

1.

   JS programs are programed by Unicode character.

1.1

  JS programs are case-sensitive.

  html--non-case-sensitive.

  XHTML--case-sensitive.

  When objects and properties in JS are same to the tags and properties in HTML, the JS must be lowercase while HTML can be itsself.

1.2

  JS will ignore the space between tokens. At most time, JS will ignore newlines.

1.3 

  JS contains special characters to express special symbol. Use "\n" as prefix. Just like "\nu0072".

1.4

  Unicode had defined the first choice of code formats for every character.

2.

  JS supports two kinds of notes:

  "//" for a line

  "/*----*/" for a block

3.

  Literals: "Hello World", 12, null, ‘javascript

4.

  Tokens of JS must begin with letter, _, or $.

  Tokens of JS also support all character in Unicode.

  JS had defined some reserved words. Them cannot be the token.

5.

  When the sentence has exclusive line, it can end without ";".

  This is a bad habit.

 

以上是关于JS - Lexical Structure的主要内容,如果未能解决你的问题,请参考以下文章

在 C++ 中使用 boost::lexical_cast 将双精度转换为字符串?

boost::lexical_cast int 用零填充字符串

boost::lexical_cast<> 的语言环境不变保证

重载运算符“>>”上的 bad_lexical_cast 异常

static_cast 与 boost::lexical_cast

Lexical Analysis & State Diagrams