❧
❧
❦
Contents
treehugger.scala
Setup
Links
I heard you like code, so…
Classy example
Thanks scalac!
Compilers 101
Scan
Parse
Semantic Analysis
Backend
Turning the table
Symbols, Types, and Trees
Symbol
Type
Tree
treehugger DSL
Conventions used in examples
Forest
Literals and Comments
Literals
Comments
Single line comments
Scaladoc style comments
Basic Declarations and Definitions
Values
Abstract value declarations
Value definitions
Lazy values
Final values
Pattern values
Variables
Abstract variable declarations
Variable definitions
Type members
Abstract type declarations
Type alias definitions
Variance annotations
Functions
Abstract function declarations
Function definition
Procedures
Currying
Default parameters
By-name parameters
Repeated parameters
Import Clauses
Classes and Objects
Templates
Classes
Class definitions
Constructor parameters
Constructor definitions
Extending classes
Self type annotations
Early denifitions
Modifiers
Access modifiers
Overriding
Final members
Abstract classes
Final classes
Sealed classes
Private constructors
Polymorphic Classes
Case Classes
Traits
Object Definitions
Case object definitions
Expressions
Basic Expressions
Literals
Simple Names
Selection
This
Super
Function Applications
Function application on selections
Sequence arguments
Named arguments
Partially applied functions
Type Applications
Tuples and Parentheses
Instance Creation Expressions
Constructor invocations
Anonymous classes
Blocks
Prefix, Infix, and Postfix Operations
Prefix operations
Postfix operations
Infix operations
Infix chaining
Types, Annotations, and Assignments
Typed expressions
Annotated expressions
Assignments
If Expressions
While loops
Do loops
For expressions
For comprehension
Return Expressions and Exception Handling
Return expression
Throwing exceptions
Catching exceptions
Anonymous Functions
Wildcard parameter
Placeholder syntax
String Interpolation
Type-Level Expressions
Type references
Applied types
Type constructors
Refined types
Singleton types
Structural types
Type projections
Existential types
Implicits
Implicit modifier
Implicit parameter
View bounds
Context bounds
Pattern Matching
Patterns
Variable patterns
Typed patterns
Pattern binders
Literal patterns
Stable identifier patterns
Constructor patterns
Tuple patterns
Pattern sequences
Infix operation patterns
Pattern alternatives
Pattern Matching Expressions
Guarded patterns
Case Sequence Functions
Pattern Values
Top-Level Definitions
Compilation Units
Packaging
Package Objects
Annotations
Declaration annotations
Type annotations
Annotated expressions
Standard Library
Root Class
Any methods
Any operators
AnyRef operators
Value Class Operators
Boolean operators
Numeric operators
Collection Class Operators
List operators
Collection operators
Collection Constructors
Type Constructors
Contents in Depth
Combined Pages
treehugger.scala
— Contents in Depth