|
644 | 644 | # Modified parse_query_vector |
645 | 645 | function parse_query_vector(s_vec_const::AbstractVector{<:AbstractString}) |
646 | 646 | s_vec = s_vec_const # Operate on slices or copies, not modifying original array passed around |
647 | | - |
648 | 647 | if isempty(s_vec) |
649 | 648 | parse_error("Empty query segment.") |
650 | 649 | end |
@@ -694,9 +693,6 @@ function parse_query_vector(s_vec_const::AbstractVector{<:AbstractString}) |
694 | 693 |
|
695 | 694 | # Base case: No top-level logical operators. Must be a keyword phrase. |
696 | 695 | else |
697 | | - #if isempty(s_vec) # Should not happen if initial checks are correct |
698 | | - # parse_error("Unexpected empty query segment.") |
699 | | - #end |
700 | 696 | token_keyword_name = s_vec[begin] |
701 | 697 |
|
702 | 698 | # Standard Keywords (e.g., "name", "resnum", "index") |
@@ -733,13 +729,6 @@ function parse_query_vector(s_vec_const::AbstractVector{<:AbstractString}) |
733 | 729 | # keyword_args will be ["<", "13"]. The Keyword functor handles this structure. |
734 | 730 | return key_obj(keyword_args) |
735 | 731 | else |
736 | | - # Case: Not a recognized "keyword operator value" structure. |
737 | | - # This implies implicit equality: "keyword value" or "keyword value1 value2 ..." (for OR expansion). |
738 | | - |
739 | | - #if isempty(keyword_args) # Should have been caught by length(s_vec) == 1 |
740 | | - # parse_error("No arguments provided for keyword '$(key_obj.name)'.") # Should be unreachable |
741 | | - #end |
742 | | - |
743 | 732 | # Sanity check for multi-value: ensure no operators are present in the value list. |
744 | 733 | # E.g. "resnum 10 < 20" is an error here because "10" is not an operator, |
745 | 734 | # but "<" appears later in a context expecting only values. |
|
0 commit comments