diff options
author | Martin Odersky <odersky@gmail.com> | 2016-03-13 20:52:59 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-04-01 11:20:17 +0200 |
commit | 32dcb8bb3a3eebf405e049f73ec4f153eb1f5b24 (patch) | |
tree | e218af5336d45113a04bcd715f934c94e59d8323 /docs | |
parent | 646ef5c321ec1c62ed03bfa24bed0438bbfcc937 (diff) | |
download | dotty-32dcb8bb3a3eebf405e049f73ec4f153eb1f5b24.tar.gz dotty-32dcb8bb3a3eebf405e049f73ec4f153eb1f5b24.tar.bz2 dotty-32dcb8bb3a3eebf405e049f73ec4f153eb1f5b24.zip |
add syntax highlighting
Diffstat (limited to 'docs')
-rw-r--r-- | docs/dotc-internals/periods.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/dotc-internals/periods.md b/docs/dotc-internals/periods.md index 0d90252a0..a616ba8a8 100644 --- a/docs/dotc-internals/periods.md +++ b/docs/dotc-internals/periods.md @@ -52,6 +52,7 @@ information All three pieces of information are encoded in a value class over a 32 bit integer. Here's the API for class `Period`: +```scala class Period(val code: Int) extends AnyVal { def runId: RunId // The run identifier of this period. def firstPhaseId: PhaseId // The first phase of this period @@ -65,6 +66,7 @@ Here's the API for class `Period`: def & (that: Period): Period def | (that: Period): Period } +``` We can access the parts of a period using `runId`, `firstPhaseId`, `lastPhaseId`, or using `phaseId` for periods consisting only of a @@ -78,6 +80,7 @@ operand, as periods spanning different `runId`s cannot be constructed. Periods are constructed using two `apply` methods: +```scala object Period { /** The single-phase period consisting of given run id and phase id */ @@ -86,5 +89,6 @@ Periods are constructed using two `apply` methods: /** The period consisting of given run id, and lo/hi phase ids */ def apply(rid: RunId, loPid: PhaseId, hiPid: PhaseId): Period } +``` As a sentinel value there's `Nowhere`, a period that is empty. |