Fixed incorrect const values
This commit is contained in:
@ -29,6 +29,10 @@ func (s *Scanner) queueDirectory(directory string, pkg string) {
|
||||
return
|
||||
}
|
||||
|
||||
if strings.HasSuffix(name, "_unix.q") && config.TargetOS != config.Linux && config.TargetOS != config.Mac {
|
||||
return
|
||||
}
|
||||
|
||||
if strings.HasSuffix(name, "_windows.q") && config.TargetOS != config.Windows {
|
||||
return
|
||||
}
|
||||
|
@ -25,18 +25,18 @@ func (s *Scanner) scanConst(file *fs.File, tokens token.List, i int) (int, error
|
||||
i++
|
||||
|
||||
for i < len(tokens) {
|
||||
if tokens[i].Kind == token.Identifier {
|
||||
switch tokens[i].Kind {
|
||||
case token.Identifier:
|
||||
name := tokens[i].Text(file.Bytes)
|
||||
i++
|
||||
|
||||
s.constants <- &core.Constant{
|
||||
Name: file.Package + "." + groupName + "." + name,
|
||||
Value: tokens[i],
|
||||
Token: tokens[i],
|
||||
File: file,
|
||||
}
|
||||
}
|
||||
|
||||
if tokens[i].Kind == token.BlockEnd {
|
||||
case token.BlockEnd:
|
||||
return i, nil
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,8 @@ func (s *Scanner) scanExtern(file *fs.File, tokens token.List, i int) (int, erro
|
||||
i++
|
||||
|
||||
for i < len(tokens) {
|
||||
if tokens[i].Kind == token.Identifier {
|
||||
switch tokens[i].Kind {
|
||||
case token.Identifier:
|
||||
function, j, err := scanFunctionSignature(file, tokens, i, token.NewLine)
|
||||
|
||||
if err != nil {
|
||||
@ -35,9 +36,8 @@ func (s *Scanner) scanExtern(file *fs.File, tokens token.List, i int) (int, erro
|
||||
function.Package = dllName
|
||||
function.UniqueName = dllName + "." + function.Name
|
||||
s.functions <- function
|
||||
}
|
||||
|
||||
if tokens[i].Kind == token.BlockEnd {
|
||||
case token.BlockEnd:
|
||||
return i, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user