Skip to content

Commit

Permalink
take out for loop stuff for this PR
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebaron committed Sep 26, 2024
1 parent 4f901e4 commit c64cfaa
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
4 changes: 0 additions & 4 deletions R/modspec.R
Original file line number Diff line number Diff line change
Expand Up @@ -431,10 +431,6 @@ token_space <- function(x) {
}

get_c_vars2 <- function(y,context) {
fors <- grep("\\bfor\\s*\\(", y, perl = TRUE)
if(length(fors)) {
y <- y[-fors]
}
m <- gregexpr(move_global_re_find,y,perl=TRUE)
regm <- unlist(regmatches(y,m))
if(length(regm)==0) return(data.frame())
Expand Down
6 changes: 0 additions & 6 deletions tests/testthat/test-modspec.R
Original file line number Diff line number Diff line change
Expand Up @@ -442,12 +442,6 @@ test_that("autodec parsing", {
expect_equal(x, "ccc")
x <- mrgsolve:::autodec_find("self.foo = 1;")
expect_equal(x, character(0))
# refuse to look at anything on a line with for loop
x <- mrgsolve:::autodec_find("for(int i = 2; i < 5; ++i) { aaa = 3;")
expect_equal(x, character(0))
# to find it, just put on a new line
x <- mrgsolve:::autodec_find(c("for(int i = 2; i < 5; ++i) {"," aaa = 3;"))
expect_equal(x, "aaa")
code <- strsplit(split = "\n", '
double a = 2;
b = 3;
Expand Down

0 comments on commit c64cfaa

Please sign in to comment.