Skip to content

Commit

Permalink
regexp/syntax: add package and Parse commentary
Browse files Browse the repository at this point in the history
Fixes #2954.

R=golang-dev, bradfitz, rsc, r
CC=golang-dev
https://golang.org/cl/5645077
  • Loading branch information
robpike committed Feb 10, 2012
1 parent 13443cc commit 1ceb561
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/pkg/regexp/syntax/parse.go
Expand Up @@ -2,6 +2,10 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Package syntax parses regular expressions into parse trees and compiles
// parse trees into programs. Most clients of regular expressions will use
// the facilities of package regexp (such as Compile and Match) instead of
// this package.
package syntax

import (
Expand Down Expand Up @@ -648,6 +652,9 @@ func literalRegexp(s string, flags Flags) *Regexp {

// Parsing.

// Parse parses a regular expression string s, controlled by the specified
// Flags, and returns a regular expression parse tree. The syntax is
// described in the top-level comment for package regexp.
func Parse(s string, flags Flags) (*Regexp, error) {
if flags&Literal != 0 {
// Trivial parser for literal string.
Expand Down

0 comments on commit 1ceb561

Please sign in to comment.