Skip to content

Commit

Permalink
Add TOC
Browse files Browse the repository at this point in the history
Copied from google/starlark-go
  • Loading branch information
laurentlb committed Sep 24, 2020
1 parent cdc2b91 commit bd8798f
Showing 1 changed file with 137 additions and 2 deletions.
139 changes: 137 additions & 2 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,143 @@ same interpreter leads to the same result. By default, user code cannot
interact with the environment.


## Contents

<!-- WTF? No automatic TOC? -->

* [Overview](#overview)
* [Contents](#contents)
* [Lexical elements](#lexical-elements)
* [Data types](#data-types)
* [None](#none)
* [Booleans](#booleans)
* [Integers](#integers)
* [Floating-point numbers](#floating-point-numbers)
* [Strings](#strings)
* [Lists](#lists)
* [Tuples](#tuples)
* [Dictionaries](#dictionaries)
* [Sets](#sets)
* [Functions](#functions)
* [Built-in functions](#built-in-functions)
* [Name binding and variables](#name-binding-and-variables)
* [Value concepts](#value-concepts)
* [Identity and mutation](#identity-and-mutation)
* [Freezing a value](#freezing-a-value)
* [Hashing](#hashing)
* [Sequence types](#sequence-types)
* [Indexing](#indexing)
* [Expressions](#expressions)
* [Identifiers](#identifiers)
* [Literals](#literals)
* [Parenthesized expressions](#parenthesized-expressions)
* [Dictionary expressions](#dictionary-expressions)
* [List expressions](#list-expressions)
* [Unary operators](#unary-operators)
* [Binary operators](#binary-operators)
* [Conditional expressions](#conditional-expressions)
* [Comprehensions](#comprehensions)
* [Function and method calls](#function-and-method-calls)
* [Dot expressions](#dot-expressions)
* [Index expressions](#index-expressions)
* [Slice expressions](#slice-expressions)
* [Lambda expressions](#lambda-expressions)
* [Statements](#statements)
* [Pass statements](#pass-statements)
* [Assignments](#assignments)
* [Augmented assignments](#augmented-assignments)
* [Function definitions](#function-definitions)
* [Return statements](#return-statements)
* [Expression statements](#expression-statements)
* [If statements](#if-statements)
* [For loops](#for-loops)
* [Break and Continue](#break-and-continue)
* [Load statements](#load-statements)
* [Module execution](#module-execution)
* [Built-in constants and functions](#built-in-constants-and-functions)
* [None](#none)
* [True and False](#true-and-false)
* [any](#any)
* [all](#all)
* [bool](#bool)
* [chr](#chr)
* [dict](#dict)
* [dir](#dir)
* [enumerate](#enumerate)
* [fail](#fail)
* [float](#float)
* [getattr](#getattr)
* [hasattr](#hasattr)
* [hash](#hash)
* [int](#int)
* [len](#len)
* [list](#list)
* [max](#max)
* [min](#min)
* [ord](#ord)
* [print](#print)
* [range](#range)
* [repr](#repr)
* [reversed](#reversed)
* [set](#set)
* [sorted](#sorted)
* [str](#str)
* [tuple](#tuple)
* [type](#type)
* [zip](#zip)
* [Built-in methods](#built-in-methods)
* [dict·clear](#dict·clear)
* [dict·get](#dict·get)
* [dict·items](#dict·items)
* [dict·keys](#dict·keys)
* [dict·pop](#dict·pop)
* [dict·popitem](#dict·popitem)
* [dict·setdefault](#dict·setdefault)
* [dict·update](#dict·update)
* [dict·values](#dict·values)
* [list·append](#list·append)
* [list·clear](#list·clear)
* [list·extend](#list·extend)
* [list·index](#list·index)
* [list·insert](#list·insert)
* [list·pop](#list·pop)
* [list·remove](#list·remove)
* [set·union](#set·union)
* [string·capitalize](#string·capitalize)
* [string·codepoint_ords](#string·codepoint_ords)
* [string·codepoints](#string·codepoints)
* [string·count](#string·count)
* [string·elem_ords](#string·elem_ords)
* [string·elems](#string·elems)
* [string·endswith](#string·endswith)
* [string·find](#string·find)
* [string·format](#string·format)
* [string·index](#string·index)
* [string·isalnum](#string·isalnum)
* [string·isalpha](#string·isalpha)
* [string·isdigit](#string·isdigit)
* [string·islower](#string·islower)
* [string·isspace](#string·isspace)
* [string·istitle](#string·istitle)
* [string·isupper](#string·isupper)
* [string·join](#string·join)
* [string·lower](#string·lower)
* [string·lstrip](#string·lstrip)
* [string·partition](#string·partition)
* [string·replace](#string·replace)
* [string·rfind](#string·rfind)
* [string·rindex](#string·rindex)
* [string·rpartition](#string·rpartition)
* [string·rsplit](#string·rsplit)
* [string·rstrip](#string·rstrip)
* [string·split](#string·split)
* [string·splitlines](#string·splitlines)
* [string·startswith](#string·startswith)
* [string·strip](#string·strip)
* [string·title](#string·title)
* [string·upper](#string·upper)
* [Dialect differences](#dialect-differences)

## Lexical elements

A Starlark program consists of one or more modules. Each module is defined by a
Expand Down Expand Up @@ -2397,8 +2534,6 @@ s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1]
`hash(x)` returns an integer hash value for a string x such that `x == y`
implies `hash(x) == hash(y)`.



### int

`int(x[, base])` interprets its argument as an integer.
Expand Down

0 comments on commit bd8798f

Please sign in to comment.