Skip to content

Commit

Permalink
fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
vipally committed Mar 18, 2021
1 parent e5364e2 commit 5eb2b92
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion cmd/gogp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
package main

import (
"github.com/gxlb/gogp"
"gogp"

"github.com/vipally/cmdline"
"github.com/vipally/cpright"
)
Expand Down
4 changes: 2 additions & 2 deletions syntax.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"fmt"

"regexp"
//regexp "github.com/dlclark/regexp2"
//regexp "github.com/dlclark/regexp2" //back-reference works too slow
)

var res = []*syntax{
Expand Down Expand Up @@ -116,7 +116,7 @@ var res = []*syntax{
&syntax{
name: "#require",
usage: "require another .gp file",
expr: `(?sm:(?P<REQ>(?:^[ \t]*/{2,}[ \t]*)#GOGP_REQUIRE\((?P<REQP>[^\n\r,]*?)(?:[ \t]*?,[ \t]*?(?:(?P<REQN>[[:word:]#@]*)|#GOGP_GPGCFG\((?P<REQGPG>[[:word:]]+)\)))??(?:[ \t]*?\))).*?$[\r\n]*(?:(?://#GOGP_IGNORE_BEGIN )?///require begin from\([^\n\r,]*?\)(?P<REQCONTENT>.*?)(?://)?(?:#GOGP_IGNORE_END )?///require end from\([^\n\r,]*?\))?[\r\n]*)`,
expr: `(?sm:(?P<REQ>(?:^[ \t]*/{2,}[ \t]*)#GOGP_REQUIRE\((?P<REQP>[^\n\r,]*?)(?:[ \t]*?,[ \t]*?(?:(?P<REQN>[[:word:]#@]*)|#GOGP_GPGCFG\((?P<REQGPG>[[:word:]]+)\)))??(?:[ \t]*?\))).*?$[\r\n](?:(?://#GOGP_IGNORE_BEGIN )?///require begin from\([^\n\r,]*?\)(?P<REQCONTENT>.*?)(?://)?(?:#GOGP_IGNORE_END )?///require end from\([^\n\r,]*?\))?[\r\n]*)`,
syntax: `
// #GOGP_REQUIRE(<gp-path> [, <gpgSection>])
`,
Expand Down
8 changes: 4 additions & 4 deletions syntax_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ head
// #GOGP_IFDEF2 xx
// #GOGP_IFDEF yyy
{if-true content}
{if-true content}
// #GOGP_ELSE //
{if-else content}
{if-else content}
// #GOGP_ENDIF //
// #GOGP_ELSE2
// #GOGP_IFDEF yyy
{if-true content}
{if-true content}
// #GOGP_ELSE
{if-else content}
{if-else content}
// #GOGP_ENDIF //
// #GOGP_ENDIF2
Expand Down

0 comments on commit 5eb2b92

Please sign in to comment.