mirror of
https://github.com/SymboScript/Book.git
synced 2024-11-06 05:43:58 +03:00
1 line
34 KiB
JSON
1 line
34 KiB
JSON
|
{"doc_urls":["specification/index.html#specification","specification/tokens/index.html#tokens","specification/tokens/token-format.html#token-format","specification/tokens/token-kinds.html#token-kinds","specification/tokens/kinds/operators.html#operators","specification/tokens/kinds/keywords.html#keywords","specification/tokens/kinds/identifiers.html#identifiers","specification/tokens/kinds/literals.html#literals","specification/tokens/kinds/literals.html#strings","specification/tokens/kinds/literals.html#numbers","specification/tokens/kinds/literals.html#booleans","specification/tokens/kinds/brackets.html#brackets","examples/index.html#examples"],"index":{"documentStore":{"docInfo":{"0":{"body":0,"breadcrumbs":2,"title":1},"1":{"body":8,"breadcrumbs":3,"title":1},"10":{"body":2,"breadcrumbs":6,"title":1},"11":{"body":0,"breadcrumbs":6,"title":1},"12":{"body":4,"breadcrumbs":3,"title":1},"2":{"body":31,"breadcrumbs":6,"title":2},"3":{"body":86,"breadcrumbs":6,"title":2},"4":{"body":0,"breadcrumbs":6,"title":1},"5":{"body":0,"breadcrumbs":6,"title":1},"6":{"body":0,"breadcrumbs":6,"title":1},"7":{"body":9,"breadcrumbs":6,"title":1},"8":{"body":13,"breadcrumbs":6,"title":1},"9":{"body":7,"breadcrumbs":6,"title":1}},"docs":{"0":{"body":"","breadcrumbs":"Specification » Specification","id":"0","title":"Specification"},"1":{"body":"This chapter describes the tokens specification. All of the tokens in the design are described in this section.","breadcrumbs":"Specification » Tokens » Tokens","id":"1","title":"Tokens"},"10":{"body":"true;\nfalse;","breadcrumbs":"Specification » Tokens » Token Kinds » Literals » Booleans","id":"10","title":"Booleans"},"11":{"body":"","breadcrumbs":"Specification » Tokens » Token Kinds » Brackets » Brackets","id":"11","title":"Brackets"},"12":{"body":"This is chapter about how the code in SymboScript looks.","breadcrumbs":"Specification » Examples » Examples","id":"12","title":"Examples"},"2":{"body":"Token pub struct Token { /// Token Type pub kind: TokenKind, /// Start offset in source pub start: usize, /// End offset in source pub end: usize, pub value: TokenValue,\n} TokenValue pub enum TokenValue { None, Number(f64), String(String),\n}","breadcrumbs":"Specification » Tokens » Token format » Token format","id":"2","title":"Token format"},"3":{"body":"This chapter describes the token kinds used in the spec. Kinds pub enum TokenKind { Eof, // end of file Comment, Unexpected, Semicolon, Comma, Colon, Dot, // Operators Plus, Minus, Star, Slash, Power, Range, Modulo, // Bitwise operators (Keyword2Operator) BitAnd, BitOr, BitNot, BitXor, BitLeftShift, BitRightShift, // Unary operators PlusPlus, MinusMinus, Question, // Logic operators (Keyword2Operator) And, Or, Xor, Not, /// Assignments operators (+=, -=, *=, /=...) Assign, FormulaAssign, PlusAssign, MinusAssign, MultiplyAssign, DivideAssign, PowerAssign, ModuloAssign, // Comparison operators Equal, NotEqual, Less, LessEqual, Greater, GreaterEqual, // Brackets LParen, RParen, LBrace, RBrace, LBracket, RBracket, // Identifiers Identifier, // Literals Number, Str, // --- Keywords --- // Keyword literals True, False, // Keywords If, Else, While, For, Loop, Let, Return, Break, Continue, Function, In,\n}","breadcrumbs":"Specification » Tokens » Token Kinds » Token Kinds","id":"3","title":"Token Kinds"},"4":{"body":"","breadcrumbs":"Specification » Tokens » Token Kinds » Operators » Operators","id":"4","title":"Operators"},"5":{"body":"","breadcrumbs":"Specification » Tokens » Token Kinds » Keywords » Keywords","id":"5","title":"Keywords"},"6":{"body":"","breadcrumbs":"Specification » Tokens » Token Kinds » Identifiers » Identifiers","id":"6","title":"Identifiers"},"7":{"body":"In SymboScript exists only three kinds of token literals: strings, numbers, booleans.","breadcrumbs":"Specification » Tokens » Token Kinds » Literals » Literals","id":"7","title":"Literals"},"8":{"body":"Strings are enclosed in double quotes, single quotes or backticks. \"hello\";\n\"hello\"`hello`;\n(\"hello\\nworld\");\n('hello\"world');\n(\"he
|